Re: [GENERAL] postgres libpq library

1999-12-02 Thread Peter Eisentraut
On Wed, 1 Dec 1999, Massimo Pichini wrote: > I guess that the postgres it-self is not designated as a multi-threaded > server. I was wondering if the library is instead thread safe (i.e.: if > it can be safely called from multi-threaded applications). That's a definite no. I'm not even sure if

[GENERAL] DB Statistics

1999-12-02 Thread Fabian . Frederick
Someone could give me some link on Database Engine compare ? Fabian http://www.geocities.com/http://www.geocities.com/lonestar_teklords/

[GENERAL] ALTER FUNCTION

1999-12-02 Thread Sascha Ziemann
Hi, are there plans for an ALTER FUNCTION statement for Postgresql? I think functions are completely unuseable, when it is not possible to change the definition of a function. A bugfix in a function requires the export of all data, a redefinition of the function and a complete reimport. Or is

Re: [GENERAL] ALTER FUNCTION

1999-12-02 Thread Moray McConnachie
UPDATE pg_proc SET prosrc='SQL statement' WHERE proname LIKE 'functionname'; seems to work for SQL queries at least. I doubt it's recommended, though! Moray -- [EMAIL PROTECTED] - Original Message - Fro

[GENERAL] CREATE TRIGGER ON UPDATE

1999-12-02 Thread Sascha Ziemann
Hi, Isn't it possible to change the data of a row from it's trigger function? I would like to have some update statistics in a database. So I creeated a basetable with a number_of_updates attribute. Then I created a child tables, that inherits the attributes. In order to update the attributes

Re: [GENERAL] ALTER FUNCTION

1999-12-02 Thread Adriaan Joubert
Just drop the function, drop all triggers that use the function, re-create the function and recreate all triggers. If the function is called by other PL functions, you need to drop and re-install those as well. If you keep them all in a big file, every one preceded by drop, you can just reload th

Re: [GENERAL] ALTER FUNCTION

1999-12-02 Thread Sascha Ziemann
Adriaan Joubert <[EMAIL PROTECTED]> writes: | Just drop the function, drop all triggers that use the function, | re-create the function and recreate all triggers. If the function is | called by other PL functions, you need to drop and re-install those as | well. If you keep them all in a big fil

Re: [GENERAL] ALTER FUNCTION

1999-12-02 Thread Sascha Ziemann
Holger Klawitter <[EMAIL PROTECTED]> writes: | > are there plans for an ALTER FUNCTION statement for Postgresql? I | > think functions are completely unuseable, when it is not possible to | > change the definition of a function. A bugfix in a function requires | > the export of all data, a rede

Re: [GENERAL] postgres libpq library

1999-12-02 Thread ^chewie
On Thu, 2 Dec 1999, Peter Eisentraut wrote: > > I guess that the postgres it-self is not designated as a multi-threaded > > server. I was wondering if the library is instead thread safe (i.e.: > > if it can be safely called from multi-threaded applications). > > That's a definite no. > > I'm no

Re: [GENERAL] "FATAL 1: my bits moved right off the end of theworld!"

1999-12-02 Thread Moray McConnachie
With all this talk of rebuilding indices, the following script does it for me: #!/bin/sh pg_dump -s databasename > filename perl -pi -e 'unless (/CREATE.*INDEX/) {s/.*//;chomp;}' filename perl -pi.create -e 's/CREATE.*?INDEX(.*?\s)ON.*/DROP INDEX$1\;/i;' filename mv filename filename.drop psql -d

Re: [GENERAL] Except operation

1999-12-02 Thread kaiq
how about I'm a sql92 lover? :-) the idea is to use index. but the engine only use index when it sees "where". so, how about add "where w.tid = w.tid" to the first (or both) select on the two sides of the except? not tested. if work, please let us know, thanks. Kai On Thu, 2 Dec 1999, Adriaan

Re: [GENERAL] Date & Time

1999-12-02 Thread kaiq
Here is the test. I did not put it in mail because pine did not like cut/paste. now I find a way to do it. It looks good! the conclusion: current_timestamp is "current" -- it should be, the looks closer than now/now() :-) ### test3=