Tom Lane schrieb:
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= writes:
I have defined an BEFORE UPDATE trigger. The trigger catch every update,
change some columns of the new row, make an insert of the new row and
returns null to abort the update.
Why in the world would you do that? Just return t
Hey Dmitriy,
thanks for your reply.
I think, its would be better to use rule on update instead of the trigger
in such case as you.
I've played the whole weekend with the rule-system, but it didn't work
for my case. I have a dynamic trigger, which takes cares about revision
of rows for every
Hello,
i have a non-trival problem and i do not believe that it is solvable.
I have defined an BEFORE UPDATE trigger. The trigger catch every update,
change some columns of the new row, make an insert of the new row and
returns null to abort the update.
All fine till here :)
Now the problem:
Joe Conway schrieb:
I am the only developer, DBA etc.. for a small project. Today (yesterday was
everything was perfect) many of the sequence numbers fell behind what is the
actual PK value. For example the invoice PK sequence current value = 1056
but the table PK was 1071. Nobody (other t
Jasen Betts schrieb:
On 2010-05-11, Torsten Zühlsdorff wrote:
Hello,
i have a problem with a trigger written in pl/pgsql.
It looks like this:
CREATE OR REPLACE FUNCTION versionize()
RETURNS TRIGGER
AS $$
BEGIN
NEW.revision := addContentRevision (OLD.content_id, OLD.revision
Hello,
i have a problem with a trigger written in pl/pgsql.
It looks like this:
CREATE OR REPLACE FUNCTION versionize()
RETURNS TRIGGER
AS $$
BEGIN
NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
/* not working line, just a stub:
EXECUTE 'INSERT INTO ' || TG_TABLE_NAM
Tom Lane schrieb:
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= writes:
NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
/* not working line, just a stub:
EXECUTE 'INSERT INTO ' || TG_TABLE_NAME || ' SELECT $1 ' USING NEW;
*/
RETURN NULL;
This seems like the
Hello,
i have a problem with a trigger written in pl/pgsql.
It looks like this:
CREATE OR REPLACE FUNCTION versionize()
RETURNS TRIGGER
AS $$
BEGIN
NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
/* not working line, just a stub:
EXECUTE 'INSERT INTO ' || TG_TABLE_NAM
Hello,
i have a problem with a trigger written in pl/pgsql.
It looks like this:
CREATE OR REPLACE FUNCTION versionize()
RETURNS TRIGGER
AS $$
BEGIN
NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
/* not working line, just a stub:
EXECUTE 'INSERT INTO ' || TG_TABLE_NAM