From: Richard Huxton <dev@archonet.com>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
To: Morgan Curley <mcurley@e4media.com>
Subject: Re: Inserts in triggers
Date: Wed, 25 Jul 2001 09:56:35 +0100
Message-ID: <009301c114e7$dd2e8960$1001a8c0@archonet.com> (raw)
References: <4.3.2.7.2.20010725030649.024f7de8@e4media.com>
From: "Morgan Curley" <mcurley@e4media.com>
> Are there server setting that need to be set in order to do inserts from
> trigger functions?
Don't think so. Triggers run with the permissions of the creator, not the
caller though so you might want to look into that.
> I keep getting: ERROR: parser: parse error at or near "$1"
> and the DEBUG log entry points to the line with the insert on it.
> i.e.
Could you quote a few lines of code either side - especially something with
the $1
> INSERT events ( event_id, sport_id ,name ,feed_code, start_time,
> active_flag, create_timestamp, update_timestamp ) VALUES ( event_id
> ,sport_id ,feed_code ,feed_code, create_timestamp, 1, create_timestamp,
> create_timestamp );
>
> where the values list is a list of predefined vars.
Well it should be INSERT INTO ... but I presume this is a cut & paste issue.
So you have variable names the same as all the field names? I'd probably
change them (stick v_ on the front or something). Even if plpgsql doesn't
get confused readers will.
- Richard Huxton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, pgsql-general@postgresql.org, mcurley@e4media.com
Subject: Re: Inserts in triggers
In-Reply-To: <009301c114e7$dd2e8960$1001a8c0@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox