[SQL] LISTEN/NOTIFY

2005-11-25 Thread Stéphane RIFF
Hi all, I just saw in the documentation the LISTEN/NOTIFY commands but i don't understand how i can use them. Can someone show me an example in PLPGSQL that use this system ? => A process send a NOTIFY command and a LISTEN process execute his own commands. Hope this clear, thanks Steff --

Re: [SQL] LISTEN/NOTIFY

2005-11-25 Thread Stéphane RIFF
Forget about this post, i hadn't well understand what i can do with this system, now i find an example in the 8.0 doc with libpq that show me how it works Sorry THX Steff ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please se

[SQL] Query two database at once

2005-05-02 Thread Stéphane RIFF
Hi, I want to ewecute a query on two database like this : SELECT * FROM table01 T1, table02 T2 WHERE T1.gid=T2.gid AND T2.my_field='".$value."' The problem is that table01 is in a different database than table02 and i don't know how to telle postgresql to look in two db. Is there a solution othe

[SQL] Query question

2005-04-20 Thread Stéphane RIFF
Hi , I have table that represent a switch activity like this : | date| state | | 2005-04-20 17:00:00 | 0 | | 2005-04-20 17:00:15 | 0 | | 2005-04-20 17:00:30 | 1 | | 2005-04-20 17:00:45 | 1 | | 2005-04-20 17:01:00 | 1 | | 2005-04-20 17:01:15