Wednesday, May 21, 2008

Re: [pgsql-de-allgemein] Tabellen im laufenden Betrieb auf andere Tablespaces verlagern ohne DB-Server Downtime?

Quoting Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>:

> > Es gibt nicht viele Provider die eine redundante Leitung zum DECIX
> > haben, ein Rechenzentrum nach den neuesten Standards und Spitzenhardware
> > zu gue¼nstingen Discountpreisen sowie unlimited Traffic inkl.
>
> Du willst ganz viel Leistung fuer ganz wenig Geld, verstehe.
> Ich enthalte mich weiterer Kommentare.

Wer will das nicht?

> > Doch, tut es, weil PG es nicht selber kann.
> > Es liest beim Start env(PGDATA) aus und erstellt relativ
> > dazu ein Verzeichnis "mydd_name" und setzt die FS Rechte
> > und Ownership auf postgres.postres. Danach connected
> > es sich selbst auf die DB und legt die Tablespaces
> > mit CREATE TABLESPACE in dem vorher erstellten Verzeichnis
> > an. Dies ist schon deswegen notwendig, da PG für CREATE
> > TABLE Spaces nun einmal einen existenten Ordner verlangt.
>
> [X] Du hast Tablespaces nicht verstanden.
>
> *Grusel* Bitte beschäftige dich erst mit einem Thema, bevor du
> versuchst, selbiges einzusetzen.

Also nun frage ich mich ob Du die Doku von der Du dauernd
redest wirklich verstanden hast.

Lies mal besser selber:
http://www.postgresql.org/docs/8.0/interactive/sql-createtablespace.html

Da steht:
Examples

CREATE TABLESPACE dbspace LOCATION '/data/dbs';

Genau das führt mein Programm aus, nur der Parameter
LOCATION eben $PGDATA/mylocation entspricht.

Was soll denn daran bitte schoen falsch sein?
Möglicherweise hast Du ja auch etwas nicht richtig verstanden,
man lernt nie aus ;d

> > Weil es nun mal so ist und ohne Downtime funktionieren muss, ganz
> > einfach, das ist die Anforderung!
>
> "Ohne Downtime" kann nicht die einzige Anforderung sein.

Downtime bedeutet Verlust von Geld. Daher ist es eigentlich recht
logisch das man sie versucht so gut es geht zu vermeiden. Natürlich
ist das die wirtschaftliche Seite, aber die ist eben auch
wichtig.

> > Downtimes und schlechte Performance bei konstanten sowie stark
> > wachsenden Userzahlen sind ein KO Kriterium und no go das unbedingt
> > vermieden werden muss und daher ist es Gegenstand der aktuellen
> Planspiele.
>
> Marketing ...

Tja, für irgendwen entwickelt man seine Software als Softwareentwickler
nun mal, am liebsten fue diejenigen Kunden die auch bereit sind
dafuer zu zahlen und fuer Binsenweisheiten zahlen die Leute nun mal
nicht viel.

> > ein verteiltes Szenario ist aber ein interessanter Gedanke, nur scheinen
> > 80 GByte Server Festplatte dabei trotzdem zu wenig, gerade wenn eine
> > Tabelle schon über 450 GByte gross ist und stark weiter wächst.
>
> Ich erinnere dich mal an deine eigenen Aussagen, dass du Terabyte bzw.
> Exobyte an Daten ablegen wolltest. Da sind auch Festplatten mit 450 GB

Ich sprach davon das eine bestimmte Tabelle bereits die Marke von
450 GByte erreicht hat und das Oracle 8 Exobate an Daten verwalten kann.

Un nun bleib mal locker;D

--
Sent via pgsql-de-allgemein mailing list (pgsql-de-allgemein@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein

Re: [pgsql-de-allgemein] Tabellen im laufenden Betrieb auf andere Tablespaces verlagern ohne DB-Server Downtime?

Quoting Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>:

> > Es gibt nicht viele Provider die eine redundante Leitung zum DECIX
> > haben, ein Rechenzentrum nach den neuesten Standards und Spitzenhardware
> > zu gue¼nstingen Discountpreisen sowie unlimited Traffic inkl.
>
> Du willst ganz viel Leistung fuer ganz wenig Geld, verstehe.
> Ich enthalte mich weiterer Kommentare.

Wer will das nicht?

> > Doch, tut es, weil PG es nicht selber kann.
> > Es liest beim Start env(PGDATA) aus und erstellt relativ
> > dazu ein Verzeichnis "mydd_name" und setzt die FS Rechte
> > und Ownership auf postgres.postres. Danach connected
> > es sich selbst auf die DB und legt die Tablespaces
> > mit CREATE TABLESPACE in dem vorher erstellten Verzeichnis
> > an. Dies ist schon deswegen notwendig, da PG für CREATE
> > TABLE Spaces nun einmal einen existenten Ordner verlangt.
>
> [X] Du hast Tablespaces nicht verstanden.
>
> *Grusel* Bitte beschäftige dich erst mit einem Thema, bevor du
> versuchst, selbiges einzusetzen.

Also nun frage ich mich ob Du die Doku von der Du dauernd
redest wirklich verstanden hast.

Lies mal besser selber:
http://www.postgresql.org/docs/8.0/interactive/sql-createtablespace.html

Da steht:
Examples

CREATE TABLESPACE dbspace LOCATION '/data/dbs';

Genau das führt mein Programm aus, nur der Parameter
LOCATION eben $PGDATA/mylocation entspricht.

Was soll denn daran bitte schoen falsch sein?
Möglicherweise hast Du ja auch etwas nicht richtig verstanden,
man lernt nie aus ;d

> > Weil es nun mal so ist und ohne Downtime funktionieren muss, ganz
> > einfach, das ist die Anforderung!
>
> "Ohne Downtime" kann nicht die einzige Anforderung sein.

Downtime bedeutet Verlust von Geld. Daher ist es eigentlich recht
logisch das man sie versucht so gut es geht zu vermeiden. Natürlich
ist das die wirtschaftliche Seite, aber die ist eben auch
wichtig.

> > Downtimes und schlechte Performance bei konstanten sowie stark
> > wachsenden Userzahlen sind ein KO Kriterium und no go das unbedingt
> > vermieden werden muss und daher ist es Gegenstand der aktuellen
> Planspiele.
>
> Marketing ...

Tja, für irgendwen entwickelt man seine Software als Softwareentwickler
nun mal, am liebsten fue diejenigen Kunden die auch bereit sind
dafuer zu zahlen und fuer Binsenweisheiten zahlen die Leute nun mal
nicht viel.

> > ein verteiltes Szenario ist aber ein interessanter Gedanke, nur scheinen
> > 80 GByte Server Festplatte dabei trotzdem zu wenig, gerade wenn eine
> > Tabelle schon über 450 GByte gross ist und stark weiter wächst.
>
> Ich erinnere dich mal an deine eigenen Aussagen, dass du Terabyte bzw.
> Exobyte an Daten ablegen wolltest. Da sind auch Festplatten mit 450 GB

Ich sprach davon das eine bestimmte Tabelle bereits die Marke von
450 GByte erreicht hat und das Oracle 8 Exobate an Daten verwalten kann.

Un nun bleib mal locker;D

--
Sent via pgsql-de-allgemein mailing list (pgsql-de-allgemein@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein

[GENERAL] Fwd: sql_type tinterval not supported by DBD::Pg


Hello

[ this was previously sent to dbd-pg mailing list ]


I have a problem with DBD::Pg connecting to postgres 8.2

....
[debug] calling bind_param( 6, '14 days', { 'pg_type' => 704 } )
Cannot bind 6, sql_type tinterval not supported by DBD::Pg




what can this mean?

I would think that both INTERVAL => 1186 and  TINTERVAL => 704  are valid values for bind_param pg_type hash



$ perl -MDBD::Pg -le 'print $DBD::Pg::VERSION'
2.7.2
$ perl -MDBI -le 'print $DBI::VERSION'
1.604


Perl itself is v5.8.8 from Debian etch.




--
Filip Rembiałkowski



Re: [GENERAL] bytea case sensitivity

On May 21, 2008, at 8:23 AM, Sim Zacks wrote:

> We are testing dbmail on postgresql, which uses a bytea column to
> store
> the messages. Because of this searching through messages is case
> sensitive.
>
> Does anyone know of a way to make it not case-sensitive, either by
> changing the data type (obviously without breaking the current
> functionality) or a Select Rule or any other method?


My suggestion would be to write a trigger and use tsearch to setup a
full text index. Even if you manage a case-insensitive search method,
I doubt it will be useful unless you always plan to have a small
number of messages to search.

John DeSoi, Ph.D.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[PERFORM] "Big O" notation for postgres?

Does anyone know if there is a source that provides "Big O" notation for
postgres's aggregate functions and operations? For example is count(*)
= O(1) or O(n)?

Do the developers for postgres use Big O when selecting algorithms? If
so, is the info easily available?

Thanks,
HH


--
H. Hall
ReedyRiver Group LLC
site: reedyriver.com


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Re: [pgsql-www] manual archive pages not showing the latest version

On Tuesday 20 May 2008 01:32:23 Guido Barosio wrote:
> Is this ok?
>
> I understand that these manual pages are in the *atic*, but it may
> lead to confusion or a complicated experience for the user if they
> miss the actual man pages.
>
> http://www.postgresql.org/docs/manuals/archive.html
>
The alternative being to not show them at all? We have a big disclaimer at
the top, I see no problem with having them online in this way.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www

Re: [pgsql-www] Korean Postgres web site is a bad URL

On Monday 19 May 2008 10:43:32 Bruce Momjian wrote:
> I am getting a 404 from the Korean Postgres web site listed on our web
> site:
>
>

http://www.postgresql.org/community/international
>
> The bad link is:
>
>

http://www.ebcom.co.kr/ebcom/case3.html
>
> I hear the site can be accessed from some places outside the USA.
>
> Is this a better URL?
>
>

http://postgresql.kr/
>

I guess it is better in the sense that it resolves. :-)

> Does anyone have a Korean contact we can ask?
>

I am CC'ing the original link owner to see what response we get. If we don't
get a response I suppose we should change it, though it might not hurt to
poke -general I guess.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www

Re: [pgsql-de-allgemein] Tabellen im laufenden Betrieb auf andere Tablespaces verlagern ohne DB-Server Downtime?

Hallo Rudi,

rudi@je-more.de wrote:
> Ich mache mir keine Gedanken über Loadbalancing, sondern habe es schon
> in meine Applicationabfrage Architektur implementiert. Normale,
> preiswerte Rootserver haben nun mal nicht besonders grosse Festplatten,
> sie reichen aber aus um einen guten Start für wenig Geld hinzulegen.

Kann Sequoia nicht sowas wie RAIDb 1+0 oder 0+1? Oder was ist RAIDb-2
von Sequoia? Schau mal hier [1].

Mir ist nicht klar, wie Du mit Tablespaces eine hoehere Verfuegbarkeit
erreichen willst. Eher das Gegenteil scheint mir der Fall zu sein:
sobald Du Tablespaces auf anderen Systemen baust, erhoehst Du die Zahl
der moeglichen Fehlerquellen - und verringerst somit die Verfuegbarkeit.

> Engpass ist jetzt halt einfach die Festplatte pro Server.
> Eine Verteilte Architektur mit DB-Server für spezielle Aufgaben
> wäre zwar wünschenswert, aber auch schwerer zu balancen, zu spiegeln,
> zu sichern und insgesammt schwerer zu warten, da es hier einfach mehr
> Komplexität hat.

Ja, ja, all die Probleme, die multi-master replication mit sich bringt...

Markus


[1]: Die RAIDb Levels von Sequoia:
http://sequoia.continuent.org/doc/2.10/userGuide/ar01s09.html#raidb2


--
Sent via pgsql-de-allgemein mailing list (pgsql-de-allgemein@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein

Re: [HACKERS] idea: storing view source in system catalogs

On Wed, May 21, 2008 at 7:56 AM, Hannu Krosing <hannu@krosing.net> wrote:
> On Wed, 2008-05-21 at 10:40 +0200, Andreas Pflug wrote:
>> Florian Pflug wrote:
>> >
>> > But maybe you could store the whitespace appearing before (or after?)
>> > a token in the parse tree that is stored for a view. That might not
>> > allow reconstructing the *precise* statement, but at least the
>> > reconstructed statement would preserve newlines and indention - which
>> > probably is the whole reason for wanting to store the original
>> > statement in the first place, no? I
>>
>>
>> Not the whole reason. To get a view definition that is more readable,
>> the pretty_bool option of pg_get_viewdef already does some newline and
>> indent formatting. Not the initial formatting, but Good Enough (TM), I
>> believe.
>>
>> What's really lost is any comment that might have existed in the initial
>> source. I previously had the idea to invent comment nodes, but never
>> came to implement them.
>
> Is'nt a view roughly equivalent to a SQL language FUNCTION with no
> arguments and a single select.
>
> If it is so, then I can't see, why we can store the source for functions
> but not for VIEWs

That's what I'm saying. The behavior is a little different however.
If you rename a column from under a function it will fail the next
time the plan is generated while a view will track the column name in
terms of how the view is defined to the backend.

In other words, you can leave the function body alone because changing
a column underlying a function has no side affects on the function
body itself. It is blindly reapplied by the backend each time it's
parsed and planned. So in a sense the function body stored in prosrc
will never diverge from the parsed function since the parsed version
is temporary.

Views are different. They are parsed and the parsed version is stored
in permanent fashion. Your comments would be right on the money if
the view was re-parsed in each session...for things to work that way
we would have to give up rename tracking of views.

For the record, I think function behavior is better (i.e. not
automatic name tracking on rename). In my ideal world, if I make
alter table DDL, I would prefer to have all dependent objects recheck
their source sql vs. the database and alert me of errors. This seems
a better way to double check for dba mistakes although column rename
can become a pain. However, I add columns, etc to tables _much_ more
frequently than I rename them.

merlin

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Re: [pgsql-es-ayuda] Consulta NLS

On Wed, May 21, 2008 at 7:38 AM, Luis Guevara <luis.a.guevara@gmail.com> wrote:
> xcen > esRGoogle
>>
>> Buenas lista!
>>
>> Mi consulta es, una vez que tengo instalado PostgreSQL y con bases de
>> datos corriendo, como hago para utilizar la opcion NLS (Native
>> Language Support) y que me tire los mensajes de error, etc. en el
>> lenguaje de mi OS, que es español???
>>
>> Saludos,
>>
>> Juan
>
> AFAIK debes debes usar configure nuevamente
>

sip, NLS solo afecta a los binarios y no a la data asi que solo se
necesita recompilar:

./configure --tus_opciones_anteriores --enable-nls
make
su root
make install

o en windows, imagino que bastaria con volver a ejecutar el instalador
sin que instale la carpeta data ni inicializar el cluster

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 087171157
--
TIP 5: ¿Has leído nuestro extenso FAQ?

http://www.postgresql.org/docs/faqs.FAQ.html

[ADMIN] v8.2.6->8.2.7 upgrade renamed /var/lib/pgsql

To all,

 

I just applied the v8.2.7 upgrade (from v8.2.6) on and FC8 server via yum.  The upgrade went OK, but the /var/lib/pgsql directory (with the existing data) was renamed to /var/lib/pgsql.old and a new (and empty) /var/lib/pgsql directory was created.

 

Does anyone know why this would have happened? 

 

The particular machine is an FC8, dual core AMD DELL with 4GB RAM running the x86_64 pg binaries.

 

I applied the same update (v8.2.6->8.2.7) to an FC7 Pentium4 box running the 32-bit pg binaries and did not have to rename the /var/lib/pgsql directories.

 

Has anyone else run into this?

 

Thanks, in advance,

 

Gord

 

Re: [HACKERS] plpgsql: penalty due to double evaluation of parameters

Hi,

I don't buy the performance argument unless I see some test results demonstrating it; exec_prepare_plan is only called on the first invocation of a statement. What kind of side-effects could exec_eval_datum call have?


Note that I have avoided using the "performance" word for this very reason. But consider for example when the datum type is PLPGSQL_DTYPE_REC. I dont think its justified to have the overhead of heap_copytuple_with_tuple, when all we need is just the typeid! Similar arguments apply for other datums like PLPGSQL_DTYPE_ROW, PLPGSQL_DTYPE_TRIGARG e.g.

Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] best er modeling tool for postgreSQL

Thanks for posting this. I had been using DB Designer 4 which has tons
of bugs in it. Power Architect is pretty nice.


Jon
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of Thomas Kellerer
> Sent: Wednesday, May 21, 2008 2:01 AM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] best er modeling tool for postgreSQL
>
> Enrico SABBADIN, 20.05.2008 15:13:
> > Hi, I'm evaluating different er modeling tools .. I have to support
the
> > same logical db on postgresql and sqlserver ..
> >
> > All tools I tried so far ignore the schema information .. all tables
end
> > up living in the default schema.
> Have a look at Power*Architect it's OpenSource and free. I have played
> around with it a bit and it looks quite nice. You can define a schema
when
> creating the DDL
>
> http://www.sqlpower.ca/page/architect
>
> Printing is a pain though (doesn't remember page settings, but the
print
> out is OK)
>
> Regards
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [PERFORM] Posible planner improvement?

Luke Lonergan wrote:
> The problem is that the implied join predicate is not being
> propagated. This is definitely a planner deficiency.

IIRC only equality conditions are propagated and gt, lt, between aren't.
I seem to remember that the argument given was that the cost of
checking for the ability to propagate was too high for the frequency
when it ocurred.

Of course, what was true for code and machines of 5 years ago might not
be so today.

--
Richard Huxton
Archonet Ltd

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Tuesday, May 20, 2008

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> Will it drop off of PlPg, or does it not really matter? ;)

It does matter from a plpg perspective not from ours.

Joshua D. Drake

>
> (Also, to verify: We're scheduled for a conference call tonight?)
>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> Ahh; it was still on my Google Calendar (the phone conference, not
> JD's birthday ;) ).
>
> Happy Birthday, JD! Still 29? ;)

No. I am officially retirement age but due to various changes in my
life, namely children it looks like I will have to put that off for
about 10 more years.

Joshua D. Drake

>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Ahh; it was still on my Google Calendar (the phone conference, not
JD's birthday ;) ).

Happy Birthday, JD! Still 29? ;)

---Michael Brewer
mbrewer@gmail.com

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

[COMMITTERS] pgtcl - libpgtcl: * Add support for the lo_truncate function that

Log Message:
-----------
* Add support for the lo_truncate function that truncates a large object
to a given length.

* Version bump to 1.7.

* Update autoconf build to Tcl Extension Architecture (TEA) 3.6

* Add new command, pg_quote_ex, which takes a connection handle
and a string to quote. If the string matches the null string,
returns NULL. If not, returns the string quoted for inclusion
in SQL commands.

* pg_quote_ex can be invoked as a method of the connection handle
as well. For instance, "$db quote $string".

* Removed unused variables and silence compiler warnings with casting.

* Added "internal_position" and "internal_query" to the error options.

Modified Files:
--------------
libpgtcl:
ChangeLog (r1.52 -> r1.53)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/ChangeLog.diff?r1=1.52&r2=1.53)
Makefile.in (r1.11 -> r1.12)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/Makefile.in.diff?r1=1.11&r2=1.12)
README.freebsd (r1.3 -> r1.4)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/README.freebsd.diff?r1=1.3&r2=1.4)
aclocal.m4 (r1.5 -> r1.6)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/aclocal.m4.diff?r1=1.5&r2=1.6)
configure (r1.15 -> r1.16)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/configure.diff?r1=1.15&r2=1.16)
configure.in (r1.14 -> r1.15)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/configure.in.diff?r1=1.14&r2=1.15)
pkgIndex.tcl.in (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/pkgIndex.tcl.in.diff?r1=1.1&r2=1.2)
libpgtcl/doc:
README (r1.4 -> r1.5)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/doc/README.diff?r1=1.4&r2=1.5)
libpgtcl.sgml (r1.21 -> r1.22)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/doc/libpgtcl.sgml.diff?r1=1.21&r2=1.22)
libpgtcl/generic:
pgtcl.c (r1.30 -> r1.31)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/generic/pgtcl.c.diff?r1=1.30&r2=1.31)
pgtclAppInit.c (r1.1 -> r1.2)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/generic/pgtclAppInit.c.diff?r1=1.1&r2=1.2)
pgtclCmds.c (r1.70 -> r1.71)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/generic/pgtclCmds.c.diff?r1=1.70&r2=1.71)
pgtclCmds.h (r1.21 -> r1.22)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/generic/pgtclCmds.h.diff?r1=1.21&r2=1.22)
pgtclId.c (r1.44 -> r1.45)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/generic/pgtclId.c.diff?r1=1.44&r2=1.45)
libpgtcl/tclconfig:
ChangeLog (r1.3 -> r1.4)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/tclconfig/ChangeLog.diff?r1=1.3&r2=1.4)
tcl.m4 (r1.6 -> r1.7)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgtcl/libpgtcl/tclconfig/tcl.m4.diff?r1=1.6&r2=1.7)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Re: [pgus-board] O.k. wrap up :)

On Tue, May 20, 2008 at 8:06 AM, Michael Alan Brewer <mbrewer@gmail.com> wrote:
> Will it drop off of PlPg, or does it not really matter? ;)
>
> (Also, to verify: We're scheduled for a conference call tonight?)

I can't. It's primary night, and I'm leaving in the morning for PgCon.

And it's JD's birthday.

Happy Birthday, JD! :)

-selena


--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Will it drop off of PlPg, or does it not really matter? ;)

(Also, to verify: We're scheduled for a conference call tonight?)

---Michael Brewer
mbrewer@gmail.com

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgsql-advocacy] PostgreSQL name

Robert Treat wrote:

>> The case is that the .org FAQ explains that both names are just fine,
>> and I am happy with that, but I seem to recall that PostgreSQL was the
>> preferred option. Though, if this is the case we should change that
>> from the site, right?
>>
>
> PostgreSQL is the official name of the project, but Postgres is considered an
> officially accepted nickname. At this point that means that you should use
> the name PostgreSQL when you are creating materials that will represent the
> project (for example, the PostgreSQL website uses (or tries to use) the name
> PostgreSQL throughout). HTH.
>

http://wiki.postgresql.org/wiki/ProjectName

Sincerely,

Joshua D. Drake

--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy

Re: [pgsql-es-ayuda] pequeña ayuda con triggers y functions

Asi es Jaime el problema es asi.


a ver si puedo explicarme mejor

tabla1
id
campo 1
campo 2
campo 3

por pagina php se actualizan campo 1 y 2 , porque lo que quiero que el campo 3 se actualize con un nuevo valor

CREATE TRIGGER change_sincro_ser BEFORE UPDATE
ON tabla1
FOR EACH ROW
EXECUTE PROCEDURE cambia_sincro( ID ) (<-- aca deberia mandarse el id o es automatico eso no lo entiendo)


CREATE OR REPLACE FUNCTION cambia_sicro(id int) RETURNS trigger AS '
BEGIN
  IF tg_op = ''UPDATE'' THEN
     UPDATE tabla1 set campo3 = 1 where id = id  ;
  
  END IF;
 
END
' LANGUAGE plpgsql;


esto es mas menos lo que tengo pero no se si estara bien

Saludos




On Mon, May 19, 2008 at 11:00 PM, Jaime Casanova <systemguards@gmail.com> wrote:
2008/5/19 Aldo Quezada <huincha@gmail.com>:
> OK
>
> a ver..
>
> tengo una tabla a la cual se le hacen actualizaciones por php.. el codigo
> del php es un asco por desorden del codigo.
>  por lo cual preferi buscar una solucion por haciendo un trigger y una
> funcion, que cada vez que se actualizara esta tabla, lanzara el trigger para
> actualizar un campo de esta misma tabla, pero caigo en la redundancia
> ciclica.
>

Corrigeme si me equivoco, tu problema es asi:

UPDATE tabla1
-> se ejecuta TRIGGER
   -> dentro del trigger ejecutas otro UPDATE tabla1
       -> Se ejecuta nuevamente el TRIGGER y vuelves al paso anterior

Eso es porque dentro del TRIGGER no debes (ni necesitas) hacer un
UPDATE a la misma tabla al mismo registro... dentro del TRIGGER tienes
disponible el record NEW que hace referencia al registro que se esta
actualizando. Todo lo que debes hacer es definir el TRIGGER como
BEFORE UPDATE y actualizar el campo en el registro NEW (NEW.campo) en
lugar de hacer un UPDATE


--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 087171157



--
アルド ファビアン ケサダ ベアス
あるど ふぁびあん けさだ べあす

Al sentir una gran tristeza te das cuenta que la alegría es el mejor remedio para seguir adelante.

¿En qué se parece un cigarro,una cerveza, medicamentos y Michale Jackson?
Todo eso hay que mantenerlo fuera del alcance de los niños.

Re: [pgus-board] O.k. wrap up :)

On Tue, May 20, 2008 at 8:03 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
> Selena Deckelmann wrote:
>>
>> I figured it out.
>>
>> The blog is actually a filter and I was not filtering for 'type'.
>>
>> It is now filtered by type.
>
> Aha! O.k. blog module re-enabeled.


:) Disregard my last email :)

--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Selena Deckelmann wrote:
> I figured it out.
>
> The blog is actually a filter and I was not filtering for 'type'.
>
> It is now filtered by type.

Aha! O.k. blog module re-enabeled.

Joshua D. Drake :)

Cool.

>
> -selena
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

[pgsql-es-ayuda] Duda

Saludos ante todo
 
Estoy queriendo inbstalas una distro de linux, algunos de ustedes me puede aconsejar cual es la mejor, preferiblemente que contenga ya el postgresql preinstalado.
 

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> On Mon, May 19, 2008 at 9:22 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> I will be sending out an announcement tomorrow morning or possibly late
>> tonight.
>
> Well, PlanetPostgreSQL has already picked it up, it seems.

O.k. I disabled the blog but not blog api module, which made the huge
post go away (hopefully planetpg will pick it up).

node/10 still exists which is good and the old blog entries still exist
as well, just not that page ... weirdo.

Joshua D. Drake

>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

I figured it out.

The blog is actually a filter and I was not filtering for 'type'.

It is now filtered by type.

-selena

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [GENERAL] DB page cache/query performance

> From: Greg Smith [mailto:gsmith@gregsmith.com]
> Sent: Monday, May 19, 2008 9:03 PM
>
> So, yes, in 8.3 it's possible that you can have sequential
> scans of large
> tables or the VACUUM data pass through the buffer cache, but
> not remain in
> it afterwards. I didn't think George would ever run into this in the
> specific example he asked about because of (1). This
> behavior only kicks
> in if you're scanning a table large relative to the total
> shared buffer
> cache and that didn't seem like an issue in his case.

Correct -- the tables in this example were tiny, shared buffers are
large, and, in any case, I am still on 8.1...

George

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [pgus-board] O.k. wrap up :)

On Tue, May 20, 2008 at 7:55 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
> Michael Alan Brewer wrote:
>>
>> On Mon, May 19, 2008 at 9:22 PM, Joshua D. Drake <jd@commandprompt.com>
>> wrote:
>>>
>>> I will be sending out an announcement tomorrow morning or possibly late
>>> tonight.
>>
>> Well, PlanetPostgreSQL has already picked it up, it seems.
>
> How in the world did that happen.... Ahh looks like Selena moved it to a
> blog entry.
>
> Selena why did you do that? Or did you do that? Do we have a weird bug?

I didn't do anything!


--
Selena Deckelmann
United States PostgreSQL Association - http://www.postgresql.us
PDXPUG - http://pugs.postgresql.org/pdx
Me - http://www.chesnok.com/daily

--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> On Mon, May 19, 2008 at 9:22 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> I will be sending out an announcement tomorrow morning or possibly late
>> tonight.
>
> Well, PlanetPostgreSQL has already picked it up, it seems.

I am not even showing it as a blog entry. I have no idea how this popped
up...

Joshua D. Drake


>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [PATCHES] Simplify formatting.c

Tom Lane wrote:

> Also, it seems a bit inconsistent to be relying on
> oracle_compat.c for upper/lower but not initcap.
>
I saw this inconsistence while I'm doing the patch. What about moving
that upper/lower/initcap and wcs* code to another file. pg_locale.c?
BTW, formatting.c and oracle_compat.c already include pg_locale.h.


--
Euler Taveira de Oliveira

http://www.timbira.com/

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> On Mon, May 19, 2008 at 9:22 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> I will be sending out an announcement tomorrow morning or possibly late
>> tonight.
>
> Well, PlanetPostgreSQL has already picked it up, it seems.

It has to be a bug or something, node/10 isn't even published.


>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

Re: [pgus-board] O.k. wrap up :)

Michael Alan Brewer wrote:
> On Mon, May 19, 2008 at 9:22 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> I will be sending out an announcement tomorrow morning or possibly late
>> tonight.
>
> Well, PlanetPostgreSQL has already picked it up, it seems.

How in the world did that happen.... Ahh looks like Selena moved it to a
blog entry.

Selena why did you do that? Or did you do that? Do we have a weird bug?

Joshua D. Drake


>
> ---Michael Brewer
> mbrewer@gmail.com
>


--
Sent via pgus-board mailing list (pgus-board@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-board

[pgsql-es-ayuda] OT - Nurit 8010 PostgreSQL Java

Muchachos se que este no es un tema para la lista, pero se que muchos de uds tienen mucha mas experiencia en el campo de la programacion. Actualmente poseo un proyecto donde estoy manejando un dispositivo movil Nurit 8010 de Verifone, el cual se comunica con mi Listener desarrollado en Java y almacena todas las transacciones en PostgreSQL, pero nos han puesto un reto, almacenar la firma de un voucher de pago en el sistema, aun no conocemos si alguien lo ha hecho ya que nurit es un grupo no se como decirlo "exclusivo" son muy pocos los que han desarrollado en esas maquinas. Si alguno de uds sabe o conoce de alguien que haya realizado este almacenamiento de la firma, que me ayude, necesito recibirla en Java procesarla convertirla a imagen y guardar en PostgreSQL


Gracias de antemano,

--
Fabio Hernando Arias Vera
Cel. 314 411 7776

Re: [GENERAL] escaping and quoting

I wrote:
> My dbmail server using postgresql produces a lot of warnings about '\\'
> in strings. The particular string it is complaining about is escaped by
> EscapeBytea, and included in single quotes (not E''). Is it all right to
> set standard_compliant_strings to on?

Laurenz Albe wrote:
> Depends.

Okay, what do you need to know? It can be any string, a part of an email
message. Should strings escaped by EscapeBytea be included in "''", or
"E''" in the SQL command, to avoid the warning?

Greetings,
Maarten

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [pgsql-es-ayuda] Algunos datos sobre PostgreSQL

Mas sobre el tema en cuestion:

[1] http://archives.postgresql.org/pgsql-advocacy/2007-09/msg00257.php
[2] http://archives.postgresql.org/pgsql-advocacy/2007-08/msg00414.php
[3] http://archives.postgresql.org/pgsql-hackers/2000-08/msg00616.php

Saludos!

On Tue, May 20, 2008 at 10:04 AM, Jaime Casanova <systemguards@gmail.com> wrote:
> On Tue, May 20, 2008 at 7:29 AM, Guido Barosio <gbarosio@gmail.com> wrote:
>> Pregunte en algunas listas y recibi esta respuesta:
>>
>> <quote>PostgreSQL is the official name of the project, but Postgres is
>> considered an
>> officially accepted nickname. At this point that means that you should use
>> the name PostgreSQL when you are creating materials that will represent the
>> project (for example, the PostgreSQL website uses (or tries to use) the name
>> PostgreSQL throughout). HTH.</quote>
>>
>
> ah, ok... eso me parece mas razonable...
>
> --
> Atentamente,
> Jaime Casanova
> Soporte y capacitación de PostgreSQL
> Guayaquil - Ecuador
> Cel. (593) 087171157
>

--
Guido Barosio
-----------------------
http://www.globant.com
guido.barosio@globant.com
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [pgsql-es-ayuda] Duda

Todas tienen la capacidad de tener PostgreSQL preinstalado, personalmente no lo recomiendo es mejor precomplilarlo, y la distro depende mucho del tipo de maquina, si es una gran maquina RedHat Enterprise es la distro que necesitas, si es mas o menos, Ubuntu o Debian

El día 20 de mayo de 2008 10:03, Oscar <oreyesp@facinf.uho.edu.cu> escribió:
Saludos ante todo
 
Estoy queriendo inbstalas una distro de linux, algunos de ustedes me puede aconsejar cual es la mejor, preferiblemente que contenga ya el postgresql preinstalado.
 



--
Fabio Hernando Arias Vera
Cel. 314 411 7776

Re: [HACKERS] Installation of Postgres 32Bit on 64 bit machine

Hi,

On Mon, 2008-05-19 at 17:10 +0530, cinu wrote:
> This installation is being done on SUSE linux 10

This is not a list for PostgreSQL installation issues, please use
-general or -admin.

...and those packages are *not* for SuSE.

Regards,
--
Devrim GÜNDÜZ , RHCE
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/

Re: [pgsql-advocacy] PostgreSQL name

Guido Barosio wrote:
> I was trying to find a thread where the discussion relied on the name,
> using PostgreSQL or just Postgres.
>
There are several threads about it; some of them are [1][2][3].

[1] http://archives.postgresql.org/pgsql-advocacy/2007-09/msg00257.php
[2] http://archives.postgresql.org/pgsql-advocacy/2007-08/msg00414.php
[3] http://archives.postgresql.org/pgsql-hackers/2000-08/msg00616.php


--
Euler Taveira de Oliveira

http://www.timbira.com/

--
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy

[Fwd: Re: [GENERAL] i am looking for postgresql hosting server]

Perhaps meant for the list.

-------- Original Message --------
Subject: Re: [GENERAL] i am looking for postgresql hosting server
Date: Tue, 20 May 2008 09:03:37 -0500
From: Vitaliyi <imgrey@gmail.com>
To: hunteke@earlham.edu
References:
<89b35b8d0805200131u4fc3bfc3ia7c80eae2565306f@mail.gmail.com>
<4832B1F3.1080802@earlham.edu>
<89b35b8d0805200658v2c7dc75duc02f681ce461b7b6@mail.gmail.com>

On Tue, May 20, 2008 at 8:58 AM, paragasu <paragasu@gmail.com> wrote:
> On Tue, May 20, 2008 at 7:11 PM, Kevin Hunter <hunteke@earlham.edu> wrote:
>>
>> At 4:36a -0400 on Tue, 20 May 2008, paragasu wrote:
>> > I am looking for postgresql dedicated hosting.
>>
>> Have you looked at the Postgres site?
>>
>> http://www.postgresql.org/support/professional_hosting
>>
>> If you're to be your own sysadmin/dba, you might also consider something
>> like slicehost. I've heard a lot of hype for them recently.
>>
>> Kevin


http://0x2a-dc.com/

this is my dc

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] rounding problems



glene77is wrote:
On May 14, 3:27 pm, s...@samason.me.uk (Sam Mason) wrote:   
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:     
Sam Mason wrote:       
What doesfoxprouse for storing numbers? or is it just that you never pushed it hard enough for the abstractions to show through.         
I know i pushed it.  Foxpro for the most has only  4 basic data types Numeric (similar to Posgresql numeric), Boolean, Date, Text aka (string)  Thefoxprotables supported far more data types but when every it was dumped to variable it acted like one of the 4.       
I really meant how much did you check the results, or did you accept that they were correct?      
Foxprodid not suffer floating point math errors.  I normally used 8 to 10 points precision.  Foxprowas limited to 15 points of precision period.   No more and no less, once you hit that was it.       
15 places seems very similar to what a 64bit IEEE floating point number will give you, i.e. a double in C/C++.      
My problem is we calculate resistance of parts in aFoxproapp that we want to move because we want to bring all the custom apps into one framework and single database.       
Take this calculation  (0.05/30000* 1.0025) which is used to calculate parts resistance and Tolerance. (its Ohms Law)  The value returned  from C++ = .0000016708 which is wrong it should be .00000167418.  We just shrank the tolerance on the part we make       
Why are you so sure about theFoxProresult?  I've just checked a few calculators and get results consistent with your C++ version.    Justin C: 0.0000016708   JFoxPro: 0.00000167418       My C: 0.000001670833      bc[1]: 0.0000016708333333333333333333333333333332      PG[2]: 0.0000016708333333333333336675  Google[3]: 0.00000167083333 (actually gives 1.67083333e-6)  Both bc and Postgres use their own code (i.e. not the CPU's FPU) to do the math, and as they all agree I'm thinkingFoxProis incorrect!  Next I tried doing it accurately (in Haskell if it makes any difference) and get an answer of 401/240000000 out, which would agree with everything butFoxPro.  If I calculate the ratio back out forFoxProI get 401/239520242 which is a little way out.      
The Documentation from MS says 15 points of precision but the result say otherwise.       
The docs for what?FoxProor their C compiler?  If you meanFoxPro, I think this is another case of MS screwing up.      
I'm glad You and others are taking the time to explain to me the odd results before i get into redoing that application.       
Welcome to the PG community, lots of people to get interested in lots of things!      
Why oh Why did MS killFoxpro. :'(   I understood it, knew its quirks and it worked very well with Postgresql       
Are you sure you want to stay with it if its answers are wrong?    Sam     
 ********************************************************************************* This is fun, at 0400 AM.  I enjoy reading  Experts having serious fun!  VFP 6.0, using my defaults ? (0.05/30000* 1.00250000000000000) displays  "0l.000001670833333000"  SET DECIMALS TO 15 ? ((0.05/30000)* 1.0025) displays "0.000001670833333"  and a frivolous example: SET DECIMALS TO 18 ? ((0.050000/30000.00000000)* 1.0025000000000000) displays "0.000001670833333000"   
Foxpro always stops at 15 decimals points,  Even though some of the documentation says 20  and 22 points of precision depending on the version.  I have versions 5 to 9
 Anybody tried to reckon this math the way we used to do it with a Slide-Rule ??? (In VFP of course)   
A slide what??.  I have never touched one or seen a slide rule in real life, just pretty pictures  :-)
 glene77is   




Re: [JDBC] org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Here is the "compatible" parameter-aware patch:

--- org/postgresql/ds/common/BaseDataSource.java.ORIG 2008-05-20 17:08:57.000000000 +0300
+++ org/postgresql/ds/common/BaseDataSource.java 2008-05-20 17:20:41.000000000 +0300
@@ -51,6 +51,7 @@
private int loginTimeout; // in seconds
private boolean ssl = false;
private String sslfactory;
+ private String compatible;

/**
* Gets a connection to the PostgreSQL database. The database is identified by the
@@ -154,6 +155,16 @@
}
}

+ public String getCompatible()
+ {
+ return compatible;
+ }
+
+ public void setCompatible(String compatible)
+ {
+ this.compatible = compatible;
+ }
+
/**
* Gets the name of the PostgreSQL database, running on the server identified
* by the serverName property.
@@ -323,6 +334,7 @@
sb.append("&sslfactory=").append(sslfactory);
}
}
+ if (compatible != null) sb.append("&compatible="+compatible);

return sb.toString();
}


--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Re: [HACKERS] triggers on prepare, commit, rollback... ?

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>>>> trigger on "prepare", "commit", "rollback", "savepoint",
>>> This is a sufficiently frequently asked question that I wish someone
>>> would add an entry to the FAQ about it, or add it to the TODO list's
>>> "Features we don't want" section.
>
>> OK, remind me why we don't want it again?
>
> I'm sure I've ranted on this several times before, but a quick archive
> search doesn't find anything. So, here are a few points to chew on:
>
> * Trigger on rollback: what's that supposed to do? The current
> transaction is already aborted, so the trigger has no hope of making any
> database changes that will ever be visible to anyone.
>
> * Trigger on commit: what do you do if the transaction fails after
> calling the trigger? The reductio ad absurdum for this is to consider
> having two on-commit triggers, where obviously the second one could
> fail.

I full agree that having triggers on rollback and on commit of 2PC
transactions is broken by design. Triggers on COMMIT (for non-2PC
transactions) and PREPARE (for 2PC-Transactions) seem workable though -
I'd expect such a trigger to be executed *before* any actual commit
handling takes place. Essentially, doing
BEGIN
<some work>
COMMIT
in the presence of an on-commit trigger would be equivalent to doing
BEGIN
<some work>
SELECT my_trigger_function
COMMIT.

A possible use-case for that is aggregating some statistics collected
during a transaction. One could e.g. maintain a cache of table rowcounts
by summing up the number of inserted and deleted records per table with
some per-row ON INSERT and ON DELETE (presumably C-language) triggers,
and than update a global cache at transaction end.

regards, Florian Pflug


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Re: [BUGS] BUG #4180: PANIC while PQExec on Client with differen locale from database

I got almost the same error:

I dumped the database, which was in Latin9, with version 8.2.6 using
UTF8 as encoding.
Then loaded the database to version 8.3.1.
Now the database was running with UTF8 while on the client still was
iso-8859-15.
As as result postgresql..exe did crash very often.

Then I tried:
$ pg_dump -U postgres -f pxdump-2008-05-19a-Latin9.txt -E='Latin9' px

and got the following message:

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: character 0xc2a4 of encoding
"UTF8"
has no equivalent in "LATIN9"
pg_dump: The command was: COPY public.p_behbl_log (lfdnr_log,
lfdnr_behbl, patnr
, datum, zahn_, zahn, behandlung, gebuehrenpos, ltyp, efs_bemerkung,
anz, faktor
, bemerkung, begruendung, material, punktzahl, punktsumme, punktwert,
betrag, wa
ehrung, fallnr, behandler, assistenz, createtime, sitzungskennz,
unfallkennz, no
tfallkennz, digest, digest_seq, abgerechnet, log_timestamp, log_user,
log_reason
) TO stdout;

in the Logfile I found:

2008-05-20 14:49:58 CEST ERROR: character 0xc2a4 of encoding "UTF8" has
no equivalent in "LATIN9"
2008-05-20 14:49:58 CEST STATEMENT: COPY public.p_behbl_log (lfdnr_log,
lfdnr_behbl, patnr, datum, zahn_, zahn, behandlung, gebuehrenpos, ltyp,
efs_bemerkung, anz, faktor, bemerkung, begruendung, material, punktzahl,
punktsumme, punktwert, betrag, waehrung, fallnr, behandler, assistenz,
createtime, sitzungskennz, unfallkennz, notfallkennz, digest,
digest_seq, abgerechnet, log_timestamp, log_user, log_reason) TO stdout;
2008-05-20 14:49:58 CEST LOG: could not receive data from client:
Unknown winsock error 10061
2008-05-20 14:49:58 CEST LOG: unexpected EOF on client connection

dumping just in utf8 did work.

Obviously, the converison from Latin9 (and other encodings?) to UTF8
did produce some characters which can not be encoded back to the
original encoding.

Regards,
Christoph Becker

Tom Lane schrieb:
> [ please keep the mailing list cc'd on discussions ]
>
> "bishop.gis" <bishop.gis@gmail.com> writes:
>
>> This is result executing the same command with client_encoding = UTF8.
>> ERROR: =CE=C5=D7=C5=D2=CE=C1=D1 =
>> =D0=CF=D3=CC=C5=C4=CF=D7=C1=D4=C5=CC=D8=CE=CF=D3=D4=D8 =C2=C1=CA=D4 =
>> =C9=CD=D1 =CB=CF=C4=C9=D2=CF=D7=CB=C9 "UTF8": 0xcdee (on
>> English -- invalid UTF-8 byte sequence detected near byte 0xcdee)
>> =F0=EF=E4=F3=EB=E1=FA=EB=E1: This error can also happen if the byte =
>> sequence does not match
>> the encoding expected by the server, which is controlled by
>> "client_encoding".
>>
>
> Hmm ... I don't read Russian, but I'm quite certain that what you sent
> isn't in UTF8. Perhaps it is in KOI8-R?
>
> This lends some weight to the theory I suggested that gettext() is
> failing to return UTF8 on Windows. That could be a red herring, since
> it's possible the encoding got changed when you copied the text into
> your mail message, but the theory seems to explain the observed facts
> so far.
>
> What locale settings are you using --- particularly lc_ctype and
> lc_messages?
>
> regards, tom lane
>
>

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Re: [pgsql-es-ayuda] Fwd: Saludos desde Mexico

> A ver si entiendo:
> Si (SELECT nombtabla from __aaatipos WHERE idt = 1) es "tabla1",
> quieres hacer un
> Select * from tabla1??
> Si es así, no es posible hacerlo en SQL. ...

> Depende de que lenguaje de programacion estes usando :
> Yo lo pondria asi :
> cTabla_recuperada = SELECT nombtabla from __aaatipos WHERE idt = 1
> SELECT * FROM &cTabla AS &cTabla;
> Lo mas recomendable en todo caso podria ser pasar el nombre de la tabla a
> una variable y de alli evaluar la variable.


Por eso yo dije "no es posible hacerlo EN SQL". Tú lo haces desde una
aplicación externa usando algún lenguaje (de programación) diferente
al SQL.

También se puede hacer en PL/pgSQL:
create or replace function obtendatos(tabla text)
returns setof record
language plpgsql
as $$
declare c refcursor;
r record;
begin
open c for execute 'select * from '|| quote_ident(tabla);
fetch c into r;
while found loop
return next r;
fetch c into r;
end loop;
return;
end;
$$;

Pero lo malo de esta opción es que tendría que conocer a priori el
esquema de la tabla que va a consultar, porque como se ve da un error
si no se indica.
penabad=> select * from obtendatos('tabla1');
ERROR: se requiere una lista de definición de columnas para funciones
que retornan «record»

En cambio, si sí se indica, funciona:
penabad=> select * from obtendatos('tabla2') as y(a int, b int);
a | b
---+---
1 | 1
2 | 2
(2 filas)

Para terminar, habría otra opción: una función que devuelve un cursor
abierto, pero sólo para ser usado en transacciones:
Primero creamos la función:
CREATE OR REPLACE FUNCTION micursor(tabla text)
RETURNS refcursor
LANGUAGE plpgsql
AS
$$
DECLARE
C REFCURSOR;
BEGIN
open c FOR EXECUTE 'select * from '|| quote_ident(tabla);
RETURN c;
END
$$;

Y luego la usamos:
penabad=> begin;
BEGIN
penabad=> select micursor('tabla2');
micursor
--------------------
<unnamed portal 6>
(1 fila)

penabad=> fetch all in "<unnamed portal 6>";
campo1 | campo2
--------+--------
1 | 1
2 | 2
(2 filas)

penabad=> commit;


Saludos
--
Miguel Rodríguez Penabad
--
TIP 7: no olvides aumentar la configuración del "free space map"

Re: [GENERAL] ranked subqueries vs distinct question

On Wed, May 14, 2008 at 10:36:31AM -0500, David McNett wrote:

> If the view is limited as you describe, don't use is.
Ah, of course, that was the best advice amongst all :-)

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Server Configuration

Hi,

I am currently trying to tweak Postgresql 8.1, to improve the overall performance of the database.  I have read over the following page/artical http://www.powerpostgresql.com/PerfList/, however at the moment (not for much longer hopefully) my hands aree tied when it comes to altering the kernel parameters, and thus allocating more shared buffers.

I have read over the rest of the artical and adjusted some of the other values mentioned.  The values I have altered are:

work_mem = 33554                            # min 64, size in KB
maintenance_work_mem = 33554        # min 1024, size in KB
max_fsm_pages = 100000                  # min max_fsm_relations*16, 6 bytes each

vacuum_cost_delay = 50                   # 0-1000 milliseconds

wal_buffers = 64                               # min 4, 8KB each
commit_delay = 0                            # range 0-100000, in microseconds
commit_siblings = 50                       # range 1-1000

effective_cache_size = 33333000     # typically 8KB each

autovacuum = on                            # enable autovacuum subprocess?
autovacuum_naptime = 30               # time between autovacuum runs, in secs
autovacuum_vacuum_threshold = 400    # min # of tuple updates before vacuum
autovacuum_analyze_threshold = 100    # min # of tuple updates before analyze
autovacuum_vacuum_scale_factor = 0.4    # fraction of rel size before vacuum
autovacuum_analyze_scale_factor = 0.2    # fraction of rel size before analyze

Is it ok to have these settings with increasing the amount of shared buffers ?


Thanks for any advice,

Andy


Re: [pgsql-www] Fwd: your post to -advocacy

Guido Barosio escribió:
> Are we droping / expiring list subscriptions for any reason?

An address that bounces can be unsubscribed automatically by Majordomo.


> ---------- Forwarded message ----------
> From: Rob Napier <rob@oncetechnologies.com>
> Date: Tue, May 20, 2008 at 12:31 AM
> Subject: Re: your post to -advocacy
> To: Guido Barosio <gbarosio@gmail.com>
>
>
> Thank you Guido.
>
> I need to find out why I am not in the advocacy list and to get back on it.
>
> Rob
>
> On 20/5/08 1:26 PM, "Guido Barosio" <gbarosio@gmail.com> wrote:
>
> > Rob,
> >
> > I have just approved your post to advocacy, thanks for taking the
> > time and writing, we really apreciate that. Please let me know if you
> > happen to surf any kind of problems with your -advocacy @ postgresql
> > activity.
> >
> > Best wishes,
>
> Regards
>
> Rob Napier
> Managing Director
> once:technologies pty ltd
>
> 46 Roseneath Street
> North Geelong VIC 3215
>
> phone: +613 5278 6699
> facsimile: +613 5278 6166
> mobile: +61 4344 00000
> after hours: +613 5222 6999
>
> developers:

www.onceradix.com
> users:

www.oncefabrik.com
>
>
>
>
> --
> Guido Barosio
> -----------------------
> http://www.globant.com
> guido.barosio@globant.com
>
> --
> Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-www


--
Alvaro Herrera

http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

--
Sent via pgsql-www mailing list (pgsql-www@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-www

Re: [PATCHES] Patch for psql 8.0, 8.1 and 8.2 backwards compatibility

Bryce Nesbitt wrote:
> "Ugh, I started the wrong version of psql again".
>
> This patch offers basic backwards compatibility, so a version 8.4 psql
> can successfully do common operations on Postgres 8.0, 8.1, 8.2 and 8.3.
> I expect it's incomplete support, but as of yet I can't find an actual
> problem. To me it is a step forward regardless, as it fixes "\d" which
> is pretty crucial even when just popping to an old server to check on
> something before an upgrade.

Guillaume Lelarge just submitted a patch for this. Did you check it
out? It's on the July commitfest page.


--
Alvaro Herrera

http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

RE: [pgsql-es-ayuda] Secuencias en Postgres

-----Mensaje original-----
De: Ing. Eris J. Gomez [mailto:eris_jose@hotmail.com]
Enviado el: Martes, 20 de Mayo de 2008 09:08 a.m.
Para: MIGUEL CANCHAS; 'Alejandro D. Burne'
CC: Alvaro Herrera; pgsql-es-ayuda@postgresql.org
Asunto: Re: [pgsql-es-ayuda] Secuencias en Postgres


Gracias por su interes, mas recuerden, que solo necesito enterarme de los
errores que me emite la base
de datos. Pense que talvez, los errores se guardaban en una tabla con un Id
de error y una descripcion.

gracias nuevamente.


--------------------------------------------------
From: "MIGUEL CANCHAS" <mcanchas@tsr.com.pe>
Sent: Tuesday, May 20, 2008 9:59 AM
To: "'Alejandro D. Burne'" <alejandro.dburne@gmail.com>; "Ing. Eris J.
Gomez" <eris_jose@hotmail.com>
Cc: "Alvaro Herrera" <alvherre@alvh.no-ip.org>;
<pgsql-es-ayuda@postgresql.org>
Subject: RE: [pgsql-es-ayuda] Secuencias en Postgres

> -----Mensaje original-----
> De: Alejandro D. Burne [mailto:alejandro.dburne@gmail.com]
> Enviado el: Lunes, 19 de Mayo de 2008 07:32 p.m.
> Para: Ing. Eris J. Gomez
> CC: Alvaro Herrera; pgsql-es-ayuda@postgresql.org
> Asunto: Re: [pgsql-es-ayuda] Secuencias en Postgres
>
>
> 2008/5/19 Ing. Eris J. Gomez <eris_jose@hotmail.com>:
>> Gracias, Álvaro.
>> Utilizo Visual FoxPro 9.0 SP2 como lenguaje de programación.
>> Para conectarme a la base de datos utilizo cursor adapter (una clase que
> me
>> convierte el recordset devuelto por la base de datos a un cursor de
>> visual
>> FoxPro) .
>>
>> Gracias nuevamente.
>>
>>
>> --------------------------------------------------
>> From: "Alvaro Herrera" <alvherre@alvh.no-ip.org>
>> Sent: Thursday, May 15, 2008 9:31 AM
>> To: "Ing. Eris J. Gomez" <eris_jose@hotmail.com>
>> Subject: Re: [pgsql-es-ayuda] Secuencias en Postgres
>>
>>> Ing. Eris J. Gomez wrote:
>>>>
>>>> Gracias Alvaro por la ayuda.
>>>> Otra preguntita: ¿Como puedo capturar los errores que me da la base de
>>>> datos desde el front end?
>>>> ¿Hay alguna tabla que almacene eso? Hay alguna funcion que me retorne
>>>> al
>>>> menos el id del error?
>>>
>>> Claro, cada lenguaje debe tener una forma de capturar el error (el
>>> codigo, el texto del mensaje, etc). Por favor pregunta en la lista
>>> indicando el lenguaje de programacion que estas usando.
>>>
>>> Ademas, si quieres que el error no cause que la transaccion aborte,
>>> puedes usar un SAVEPOINT.
>>>
>>> --
>>> Alvaro Herrera http://www.advogato.org/person/alvherre
>>> La web junta la gente porque no importa que clase de mutante sexual
>>> seas,
>>> tienes millones de posibles parejas. Pon "buscar gente que tengan sexo
> con
>>> ciervos incendiándose", y el computador dirá "especifique el tipo de
>>> ciervo"
>>> (Jason Alexander)
>>>
>> --
>> TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net
>>
>
> mmmm... te sugeriría utilizar sqlpassthrough, es un poco mas tedioso
> pero tienes bajo tu control a vfp. Cursor adapter es una caja de
> Pandora.
>
> Saludos, Alejandro
> --
> TIP 2: puedes desuscribirte de todas las listas simultáneamente
> (envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)
>
>
****************************************************************************
> **************************
> De acuerdo contigo, yo tambien prefiero usarlo de esa manera, los
> "cursoradapters" lo veo tan simple que prefiero tener mayor control sobre
> los mismos, asi que creo una clase para poder conectarme y poder grabar o
> agregar registros.
>
> Yo tambien uso VFP 9 .
>
> Miguel Canchas
>

Yo capturo los errores con AERROR(variable_cualquiera) y lo muestro con el
messagebox(variable_cualquiera(2))

Obviamente desde VFP

Miguel Canchas
--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)

Re: [pgsql-es-ayuda] Secuencias en Postgres

Gracias por su interes, mas recuerden, que solo necesito enterarme de los
errores que me emite la base
de datos. Pense que talvez, los errores se guardaban en una tabla con un Id
de error y una descripcion.

gracias nuevamente.


--------------------------------------------------
From: "MIGUEL CANCHAS" <mcanchas@tsr.com.pe>
Sent: Tuesday, May 20, 2008 9:59 AM
To: "'Alejandro D. Burne'" <alejandro.dburne@gmail.com>; "Ing. Eris J.
Gomez" <eris_jose@hotmail.com>
Cc: "Alvaro Herrera" <alvherre@alvh.no-ip.org>;
<pgsql-es-ayuda@postgresql.org>
Subject: RE: [pgsql-es-ayuda] Secuencias en Postgres

> -----Mensaje original-----
> De: Alejandro D. Burne [mailto:alejandro.dburne@gmail.com]
> Enviado el: Lunes, 19 de Mayo de 2008 07:32 p.m.
> Para: Ing. Eris J. Gomez
> CC: Alvaro Herrera; pgsql-es-ayuda@postgresql.org
> Asunto: Re: [pgsql-es-ayuda] Secuencias en Postgres
>
>
> 2008/5/19 Ing. Eris J. Gomez <eris_jose@hotmail.com>:
>> Gracias, Álvaro.
>> Utilizo Visual FoxPro 9.0 SP2 como lenguaje de programación.
>> Para conectarme a la base de datos utilizo cursor adapter (una clase que
> me
>> convierte el recordset devuelto por la base de datos a un cursor de
>> visual
>> FoxPro) .
>>
>> Gracias nuevamente.
>>
>>
>> --------------------------------------------------
>> From: "Alvaro Herrera" <alvherre@alvh.no-ip.org>
>> Sent: Thursday, May 15, 2008 9:31 AM
>> To: "Ing. Eris J. Gomez" <eris_jose@hotmail.com>
>> Subject: Re: [pgsql-es-ayuda] Secuencias en Postgres
>>
>>> Ing. Eris J. Gomez wrote:
>>>>
>>>> Gracias Alvaro por la ayuda.
>>>> Otra preguntita: ¿Como puedo capturar los errores que me da la base de
>>>> datos desde el front end?
>>>> ¿Hay alguna tabla que almacene eso? Hay alguna funcion que me retorne
>>>> al
>>>> menos el id del error?
>>>
>>> Claro, cada lenguaje debe tener una forma de capturar el error (el
>>> codigo, el texto del mensaje, etc). Por favor pregunta en la lista
>>> indicando el lenguaje de programacion que estas usando.
>>>
>>> Ademas, si quieres que el error no cause que la transaccion aborte,
>>> puedes usar un SAVEPOINT.
>>>
>>> --
>>> Alvaro Herrera http://www.advogato.org/person/alvherre
>>> La web junta la gente porque no importa que clase de mutante sexual
>>> seas,
>>> tienes millones de posibles parejas. Pon "buscar gente que tengan sexo
> con
>>> ciervos incendiándose", y el computador dirá "especifique el tipo de
>>> ciervo"
>>> (Jason Alexander)
>>>
>> --
>> TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net
>>
>
> mmmm... te sugeriría utilizar sqlpassthrough, es un poco mas tedioso
> pero tienes bajo tu control a vfp. Cursor adapter es una caja de
> Pandora.
>
> Saludos, Alejandro
> --
> TIP 2: puedes desuscribirte de todas las listas simultáneamente
> (envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)
>
> ****************************************************************************
> **************************
> De acuerdo contigo, yo tambien prefiero usarlo de esa manera, los
> "cursoradapters" lo veo tan simple que prefiero tener mayor control sobre
> los mismos, asi que creo una clase para poder conectarme y poder grabar o
> agregar registros.
>
> Yo tambien uso VFP 9 .
>
> Miguel Canchas
>
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

http://archives.postgresql.org/pgsql-es-ayuda

RE: [pgsql-es-ayuda] Secuencias en Postgres

-----Mensaje original-----
De: Alejandro D. Burne [mailto:alejandro.dburne@gmail.com]
Enviado el: Lunes, 19 de Mayo de 2008 07:32 p.m.
Para: Ing. Eris J. Gomez
CC: Alvaro Herrera; pgsql-es-ayuda@postgresql.org
Asunto: Re: [pgsql-es-ayuda] Secuencias en Postgres


2008/5/19 Ing. Eris J. Gomez <eris_jose@hotmail.com>:
> Gracias, Álvaro.
> Utilizo Visual FoxPro 9.0 SP2 como lenguaje de programación.
> Para conectarme a la base de datos utilizo cursor adapter (una clase que
me
> convierte el recordset devuelto por la base de datos a un cursor de visual
> FoxPro) .
>
> Gracias nuevamente.
>
>
> --------------------------------------------------
> From: "Alvaro Herrera" <alvherre@alvh.no-ip.org>
> Sent: Thursday, May 15, 2008 9:31 AM
> To: "Ing. Eris J. Gomez" <eris_jose@hotmail.com>
> Subject: Re: [pgsql-es-ayuda] Secuencias en Postgres
>
>> Ing. Eris J. Gomez wrote:
>>>
>>> Gracias Alvaro por la ayuda.
>>> Otra preguntita: ¿Como puedo capturar los errores que me da la base de
>>> datos desde el front end?
>>> ¿Hay alguna tabla que almacene eso? Hay alguna funcion que me retorne al
>>> menos el id del error?
>>
>> Claro, cada lenguaje debe tener una forma de capturar el error (el
>> codigo, el texto del mensaje, etc). Por favor pregunta en la lista
>> indicando el lenguaje de programacion que estas usando.
>>
>> Ademas, si quieres que el error no cause que la transaccion aborte,
>> puedes usar un SAVEPOINT.
>>
>> --
>> Alvaro Herrera http://www.advogato.org/person/alvherre
>> La web junta la gente porque no importa que clase de mutante sexual seas,
>> tienes millones de posibles parejas. Pon "buscar gente que tengan sexo
con
>> ciervos incendiándose", y el computador dirá "especifique el tipo de
>> ciervo"
>> (Jason Alexander)
>>
> --
> TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net
>

mmmm... te sugeriría utilizar sqlpassthrough, es un poco mas tedioso
pero tienes bajo tu control a vfp. Cursor adapter es una caja de
Pandora.

Saludos, Alejandro
--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envía "unregister TuDirecciónDeCorreo" a majordomo@postgresql.org)

****************************************************************************
**************************
De acuerdo contigo, yo tambien prefiero usarlo de esa manera, los
"cursoradapters" lo veo tan simple que prefiero tener mayor control sobre
los mismos, asi que creo una clase para poder conectarme y poder grabar o
agregar registros.

Yo tambien uso VFP 9 .

Miguel Canchas
--
TIP 5: ¿Has leído nuestro extenso FAQ?

http://www.postgresql.org/docs/faqs.FAQ.html

Re: [GENERAL] i am looking for postgresql hosting server



On Tue, May 20, 2008 at 7:11 PM, Kevin Hunter <hunteke@earlham.edu> wrote:
At 4:36a -0400 on Tue, 20 May 2008, paragasu wrote:
> I am looking for postgresql dedicated hosting.

Have you looked at the Postgres site?

http://www.postgresql.org/support/professional_hosting

If you're to be your own sysadmin/dba, you might also consider something
like slicehost.  I've heard a lot of hype for them recently.

Kevin

i did see the list. i will look into  slicehost..
thanks

[ADMIN] how i can restrict databaseusers ?

hello
how i can restrict dbusers ( user's db size, cpu time)?
how i can monitoring this parameters

RE: [pgsql-es-ayuda] Fwd: Saludos desde Mexico

-----Mensaje original-----
De: Miguel Rodríguez Penabad [mailto:penabad@gmail.com]
Enviado el: Lunes, 19 de Mayo de 2008 06:16 p.m.
Para: Pavel Rodriguez de la Torre
CC: pgsql-es-ayuda@postgresql.org
Asunto: Re: [pgsql-es-ayuda] Fwd: Saludos desde Mexico


El día 19 de mayo de 2008 16:41, Pavel Rodriguez de la Torre
<prodriguezdlt@yahoo.com> escribió:
> Buen dia, este mail es sobre una duda en postgre, ojala me puedan

El nombre es "Postgres" o "PostgreSQL", no "postgre" ;)

> ayudar....tengo una base de datos en la cual tengo una tabla donde
almaceno
> los nombres de otras tablas que utilizo, el problema es que no logro hacer
> un select anidado donde el nombre de la tabla que voy a utilizar provenga
> del select de la tabla donde guardo los nombres de tablas.....la sentencia
> que estoy tratando de utilizar es la siguiente...y por mas que lo he
> intentado solo me regresa el nombre de la tabla pero no la puedo utilizar
> como nombre en el select from....
>
> SELECT * FROM (SELECT nombtabla from __aaatipos WHERE idt = 1) AS
> nomb_tabla;
>
> tambien probe con
>
> SELECT nomb_tabla.* FROM (SELECT nombtabla from __aaatipos WHERE idt = 1)
AS
> nomb_tabla;
>
>
> pero las dos opciones me regresan el nombre de la tabla que necesito pero
no
> hacen el select * de esa tabla
>
> porfaa ojala me pudieran hechar la mano...Gracias de antemano
>

A ver si entiendo:
Si (SELECT nombtabla from __aaatipos WHERE idt = 1) es "tabla1",
quieres hacer un
Select * from tabla1??

Si es así, no es posible hacerlo en SQL. Al menos hasta donde yo sé.
Podrías hacerlo en PL/pgSQL utilizando cursores y SQL dinámico, pero
(y es opinión personal) creo que tienes un problema de diseño de la
base de datos
o de la aplicación de acceso.

Saludos

--
Miguel Rodríguez Penabad
--
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

http://archives.postgresql.org/pgsql-es-ayuda

**************************************

Depende de que lenguaje de programacion estes usando :

Yo lo pondria asi :

cTabla_recuperada = SELECT nombtabla from __aaatipos WHERE idt = 1

SELECT * FROM &cTabla AS &cTabla;


Lo mas recomendable en todo caso podria ser pasar el nombre de la tabla a
una variable y de alli evaluar la variable.

Miguel Canchas
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

[pgsql-ru-general] ограничение пользователя постгреса

подскажите пожалуйста - как можно в постгресе ограничить пользователей на использовании системных ресурсов (времени выполнения ,места на диске, загруженость процессора) ?

Re: [INTERFACES] Newbie problem with from database in C

On Tue, May 20, 2008 at 12:43 AM, <clarkhorse@clarktx.com> wrote:
>>IIRC, you need to convert from network byte order:
>>
>>idno = ntohl(*((int32 *) PQgetvalue(result, row, 0)));
>>
> Thanks it led me in the right direction.
> I was getting confused with all of the pointers. I finally broke it down.

Oh yeah, I didn't spend enough time looking at whether you had defined
it as a pointer or not. My bad!

> Thanks again,

No problem.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com
Edison, NJ 08837 | http://www.enterprisedb.com/

--
Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces

Re: [JDBC] org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Στις Tuesday 20 May 2008 16:07:14 ο/η Achilleas Mantzios έγραψε:
> Στις Tuesday 20 May 2008 15:27:47 ο/η Achilleas Mantzios έγραψε:
> > Hi,
> > i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating from 7.4.x).
> > I have decided to use XA support, since due to jboss changes Jboss TM -> Jboss TS, some code that used to work
> > didnt work any more. This is not PostgreSQL issue of course.
> > One option would be to run Jboss with Jboss TM, which is a deprecated way that will certainly couse future problems.
> > So i used Jboss TS, but inorder to do that i had to use the org.postgresql.xa.PGXADataSource instead of the classic org.postgresql.Driver
> > local datasource.
> > I did so, and it worked!!
> > The problem is that i dont know of a way to tell the org.postgresql.xa.PGXADataSource to use compatible=8.2, for array usage.
> > Is there any workaround?
> > I will post the same to the jboss camp as well.
>
> Does org.postgresql.xa.PGXADataSource support property "URL"?
Just browsing the source of

http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/ds/common/BaseDataSource.java?rev=1.13&content-type=text/x-cvsweb-markup
and i cant find anything close to supporting the "compatible" parameter.
Any thoughts?
>
> > --
> > Achilleas Mantzios
> >
>
>
>
> --
> Achilleas Mantzios
>

--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

[BUGS] BUG #4184: Undefined reference to 'SSL_CTX_set_client_cert_db' in /usr/lib/libpq.so.5

The following bug has been logged online:

Bug reference: 4184
Logged by: Mikael Omma
Email address: mikael.omma@ge.com
PostgreSQL version: 8.2.6
Operating system: SUSE SLED 10 SP1
Description: Undefined reference to 'SSL_CTX_set_client_cert_db' in
/usr/lib/libpq.so.5
Details:

undefined reference to SSL_CTX_set_client_cert_db in /usr/lib/libpq.so.5

I have upgraded to 8.2.6 from 8.1.3 I get this error message at link time.


The rpm do not require any SSL.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

[GENERAL] best er modeling tool for postgreSQL

Hi, I’m evaluating different er modeling tools .. I have to support the same logical db on postgresql and sqlserver ..

All tools I tried so far ignore the schema information .. all tables end up living in the default schema.

 

What can you suggest ? thank you

 

PLS: reply directly as well

Best regards

 

Enrico Sabbadin

enrico.sabbadin@wki.it

 

Can you fly that thing ?

Not Yet (The Matrix)

 

Re: [JDBC] org.postgresql.xa.PGXADataSource and compatible=8.2 in query string

Στις Tuesday 20 May 2008 15:27:47 ο/η Achilleas Mantzios έγραψε:
> Hi,
> i have been struggling to correctly setup a new Jboss 4.2.2 (migrating from 3.x) and postgresql 8.3.1 (migrating from 7.4.x).
> I have decided to use XA support, since due to jboss changes Jboss TM -> Jboss TS, some code that used to work
> didnt work any more. This is not PostgreSQL issue of course.
> One option would be to run Jboss with Jboss TM, which is a deprecated way that will certainly couse future problems.
> So i used Jboss TS, but inorder to do that i had to use the org.postgresql.xa.PGXADataSource instead of the classic org.postgresql.Driver
> local datasource.
> I did so, and it worked!!
> The problem is that i dont know of a way to tell the org.postgresql.xa.PGXADataSource to use compatible=8.2, for array usage.
> Is there any workaround?
> I will post the same to the jboss camp as well.

Does org.postgresql.xa.PGXADataSource support property "URL"?

> --
> Achilleas Mantzios
>

--
Achilleas Mantzios

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Re: [pgsql-es-ayuda] Algunos datos sobre PostgreSQL

On Tue, May 20, 2008 at 7:29 AM, Guido Barosio <gbarosio@gmail.com> wrote:
> Pregunte en algunas listas y recibi esta respuesta:
>
> <quote>PostgreSQL is the official name of the project, but Postgres is
> considered an
> officially accepted nickname. At this point that means that you should use
> the name PostgreSQL when you are creating materials that will represent the
> project (for example, the PostgreSQL website uses (or tries to use) the name
> PostgreSQL throughout). HTH.</quote>
>

ah, ok... eso me parece mas razonable...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 087171157
--
TIP 3: Si encontraste la respuesta a tu problema, publícala, otros te lo agradecerán

Re: [GENERAL] Schema migration tools?

Christophe,

I agree with Dr. DeSoi that it may not always be possible to automate
schema transformations. However, if you need to compare the metadata
between two databases, the free, open-source SchemaCrawler for SQL
Server tool will do this for you. You can take human-readable
snapshots of the schema and data, for later comparison. Comparisons
are done using a standard diff tool such as WinMerge. SchemaCrawler
outputs details of your schema (tables, views, procedures, and more)
in a diff-able plain-text format (text, CSV, or XHTML). SchemaCrawler
can also output data (including CLOBs and BLOBs) in the same plain-
text formats.

SchemaCrawler is available at SourceForge:
http://schemacrawler.sourceforge.net/

Sualeh Fatehi

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] rounding problems

On May 14, 3:27 pm, s...@samason.me.uk (Sam Mason) wrote:
> On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
> > Sam Mason wrote:
> > >What doesfoxprouse for storing numbers? or is it just that you never
> > >pushed it hard enough for the abstractions to show through.
>
> > I know i pushed it. Foxpro for the most has only 4 basic data types
> > Numeric (similar to Posgresql numeric), Boolean, Date, Text aka
> > (string) Thefoxprotables supported far more data types but when every
> > it was dumped to variable it acted like one of the 4.
>
> I really meant how much did you check the results, or did you accept
> that they were correct?
>
> >Foxprodid not suffer floating point math errors. I normally used 8 to
> > 10 points precision. Foxprowas limited to 15 points of precision
> > period. No more and no less, once you hit that was it.
>
> 15 places seems very similar to what a 64bit IEEE floating point number
> will give you, i.e. a double in C/C++.
>
> > My problem is we calculate resistance of parts in aFoxproapp that we
> > want to move because we want to bring all the custom apps into one
> > framework and single database.
>
> > Take this calculation (0.05/30000* 1.0025) which is used to calculate
> > parts resistance and Tolerance. (its Ohms Law) The value returned from
> > C++ = .0000016708 which is wrong
> > it should be .00000167418. We just shrank the tolerance on the part we
> > make
>
> Why are you so sure about theFoxProresult? I've just checked a few
> calculators and get results consistent with your C++ version.
>
> Justin C: 0.0000016708
> JFoxPro: 0.00000167418
> My C: 0.000001670833
> bc[1]: 0.0000016708333333333333333333333333333332
> PG[2]: 0.0000016708333333333333336675
> Google[3]: 0.00000167083333 (actually gives 1.67083333e-6)
>
> Both bc and Postgres use their own code (i.e. not the CPU's FPU) to do
> the math, and as they all agree I'm thinkingFoxProis incorrect! Next
> I tried doing it accurately (in Haskell if it makes any difference) and
> get an answer of 401/240000000 out, which would agree with everything
> butFoxPro. If I calculate the ratio back out forFoxProI get
> 401/239520242 which is a little way out.
>
> > The Documentation from MS says 15 points of precision but the result say
> > otherwise.
>
> The docs for what?FoxProor their C compiler?
>
> If you meanFoxPro, I think this is another case of MS screwing up.
>
> > I'm glad You and others are taking the time to explain to me
> > the odd results before i get into redoing that application.
>
> Welcome to the PG community, lots of people to get interested in lots of
> things!
>
> > Why oh Why did MS killFoxpro. :'( I understood it, knew its quirks
> > and it worked very well with Postgresql
>
> Are you sure you want to stay with it if its answers are wrong?
>
> Sam

*********************************************************************************
This is fun, at 0400 AM. I enjoy reading Experts having serious fun!

VFP 6.0, using my defaults
? (0.05/30000* 1.00250000000000000)
displays "0l.000001670833333000"

SET DECIMALS TO 15
? ((0.05/30000)* 1.0025)
displays "0.000001670833333"

and a frivolous example:
SET DECIMALS TO 18
? ((0.050000/30000.00000000)* 1.0025000000000000)
displays "0.000001670833333000"

Anybody tried to reckon this math
the way we used to do it with a Slide-Rule ???
(In VFP of course)

glene77is

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general