I got it resolved. I just need to put below statement into single quote
instead of double quote. :)
my $query ='INSERT INTO log_table(id) SELECT $1 EXCEPT SELECT id FROM
log_table WHERE id = $1;';
Thanks,
Jignesh
On Thu, Apr 22, 2010 at 2:02 PM, Jignesh Shah wrote:
> Thanks Anreas but I think t
Thanks Anreas but I think that's not a issue. The issue is something to do
with "$1". I don't know how to get rid of it.
techdb=# INSERT INTO log_table(id) SELECT 5 EXCEPT SELECT id FROM log_table
WHERE id = 5;
INSERT 0 1
techdb=# select * from log_table;
id | txid | txtime
+-
Jignesh Shah wrote:
> Hi All,
>
> I have written below trigger and applied on the table but it is giving syntax
> error when it gets invoked. Could you please help me what is wrong? I have
> given complete details here:
>
> my trigger function:
>
> CREATE OR REPLACE FUNCTION techdb_logtable
Hi All,
I have written below trigger and applied on the table but it is giving
syntax error when it gets invoked. Could you please help me what is wrong? I
have given complete details here:
*my trigger function:*
**
CREATE OR REPLACE FUNCTION techdb_logtable_trigger()
RETURNS trigger AS
$BODY$