FW: [SQL] simple? query

2009-08-18 Thread Jan Verheyden
Hi, Thanks for the suggestion, the only problem is, if primary key is used then each row should be unique what is not true; since I have a column 'registered' what only can be 1 or 0... Regards, Jan -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postg

[SQL] simple? query

2009-08-13 Thread Jan Verheyden
Hi, I was trying to run following query but doesn't work: if (uid='janvleuven10') then insert into test (registered) values ('1'); else insert into test (registered) values ('0'); end if; [cid:image001.png@01CA1C1B.03410D10] Anyone an idea? Regards, Jan <>

Re: [SQL] mail alert

2009-08-12 Thread Jan Verheyden
Hi, Is it possible to use pgsql for creating a mailer script?? Can you help me as well with my first question? (below) Thanks a lot! Jan -Original Message- From: Rob Sargent [mailto:robjsarg...@gmail.com] Sent: Wednesday, August 12, 2009 4:01 PM To: Jan Verheyden Cc: 'Denis B

Re: [SQL] mail alert

2009-08-12 Thread Jan Verheyden
: Jan Verheyden; 'pgsql-sql@postgresql.org' Subject: Re: [SQL] mail alert Denis BUCHER wrote: > Hello, > > Jan Verheyden a écrit : > >> I was looking in what way it’s possible to alert via mail when some >> conditions are true in a database. >> >

Re: [SQL] mail alert

2009-08-12 Thread Jan Verheyden
It's on Windows From: ramasubramanian [mailto:ramasubramania...@renaissance-it.com] Sent: Wednesday, August 12, 2009 6:01 AM To: Jan Verheyden; pgsql-sql@postgresql.org Subject: Re: [SQL] mail alert Hi, Can you just tell me whether your database is place on which server(linux/or windo

[SQL] mail alert

2009-08-11 Thread Jan Verheyden
Hi All, I was looking in what way it's possible to alert via mail when some conditions are true in a database. Thanks in advance! Jan

[SQL] FW: trigger problem

2009-08-06 Thread Jan Verheyden
n I get the same error message as below.. Is this because it tries to make connection for each row in the column?? Thanks, Jan From: Jan Verheyden Sent: Thursday, August 06, 2009 11:09 AM To: 'pgsql-sql@postgresql.org' Subject: trigger problem Hi, If I try this to run in a trigger

[SQL] trigger problem

2009-08-06 Thread Jan Verheyden
Hi, If I try this to run in a trigger function 'perform dblink_connect('myconnect','dbname=postgres password=uzleuven'); perform dblink_exec('myconnect', 'insert into test (uid) values (' || quote_literal(NEW.pat_id) || ')'); return new; perform dblink_disconnect('myconnect');' I get the mess

[SQL] question about pgagent

2009-08-05 Thread Jan Verheyden
Hi All, First I will explain what I try to do: I'd like to synchronize more or less two databases, in a third database. I mean, I want to book keep when an object has arrived in both databases. (In one database I am allowed to use trigger function but not in the other) 1) Postgres (maint