Re: [SQL] implementing an out-of-transaction trigger

2004-09-15 Thread Iain
Hi Greg, I would have like to have avoided writing a daemon if possible, but presumably it should be possible to write one flexible enough to be used in a variety of situations. If I didn't use notify, I'd would just be checking for the presence of data in "transfer areas" or queue tables as you

Re: [SQL] implementing an out-of-transaction trigger

2004-09-15 Thread Greg Stark
"Iain" <[EMAIL PROTECTED]> writes: > Though, as far as I can tell, there is no way to have the notify activate a > pl/pgsql function directly. I'll still need to write a client program to > create a session and actually do the listening, that is if I havn't missed > anything else... Right, presu

Re: [SQL] implementing an out-of-transaction trigger

2004-09-15 Thread Iain
Hi Mike, Thanks, that's exactly what I was looking for. A quick quote from the docs: ...if a NOTIFY is executed inside a transaction, the notify events are not delivered until and unless the transaction is committed. ...if a listening session receives a notification signal while it is within a t

Re: [SQL] implementing an out-of-transaction trigger

2004-09-15 Thread Mike Rylander
>I've come across a situation where I'd like to use some kind of "out-of-transaction >trigger" to do some processing after changes to some tables, but without extending >the duration of the main transaction. Of course, it's important that the processing be >completed so it has to be, as far as poss

Re: [SQL] Preserving column order when recreating table.

2004-09-15 Thread Andrew Sullivan
On Wed, Sep 15, 2004 at 05:07:00PM +0200, Stef wrote: > Funny you say. It looks like "Bob" had a hand in pg_dump -d , 'cause I've > many times wished there were column names specified there, too :) > (I'm talking Prior 7.4 here, dunno if it's changed already) Dunno about previous, but pg_dump -D d

Re: [SQL] Preserving column order when recreating table.

2004-09-15 Thread Stef
Andrew mentioned : => Ugh. Sorry to say so, but this sounds to me really a lot like the => cure is worse than the disease. The answer to "Bob did something => incredibly stupid" is not "We'll bend ourselves into contortions to => support it." (This is not to say I don't sympathise. You wouldn't

Re: [SQL] Preserving column order when recreating table.

2004-09-15 Thread Andrew Sullivan
On Wed, Sep 15, 2004 at 04:22:01PM +0200, Stef wrote: > Andrew Sullivan mentioned : > => I'm not sure why you want to do the former, but in any case, it's > Because lazy people write inserts without specifying column names. Ugh. Sorry to say so, but this sounds to me really a lot like the cure is

Re: [SQL] Preserving column order when recreating table.

2004-09-15 Thread Stef
Andrew Sullivan mentioned : => I'm not sure why you want to do the former, but in any case, it's Because lazy people write inserts without specifying column names. => possible by creating a new table which has things the way you want; => select all the old data from the old table into the new tabl

Re: [SQL] Preserving column order when recreating table.

2004-09-15 Thread Andrew Sullivan
On Wed, Sep 15, 2004 at 02:24:45PM +0200, Stef wrote: > I'm struggling with a situation where I > want to recreate a table (in more than 30 databases) to > fix the column order (attnum sequence) and in another case, > fix different definitions for the same column in a table e.g. > amount numeric

[SQL] Preserving column order when recreating table.

2004-09-15 Thread Stef
Hi all, I'm struggling with a situation where I want to recreate a table (in more than 30 databases) to fix the column order (attnum sequence) and in another case, fix different definitions for the same column in a table e.g. amount numeric(16,2) in stead of : amount numeric(16,5) The complica

Re: [SQL] sleep function

2004-09-15 Thread Sanjay Singh
Hi All, I am getting this message while I am trying to implement tsearch. java.sql.SQLException: ERROR: could not find tsearch config by locale what could be the problem Please help bye Sanjay Greg Stark wrote: John DeSoi <[EMAIL PROTECTED]> writes: On Aug 10, 2004, at 10:57 AM, Bruce Momjian wro