Tom Lane schrieb:
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= f...@meisterderspiele.de 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
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
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
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
Jasen Betts schrieb:
On 2010-05-11, Torsten Zühlsdorff f...@meisterderspiele.de 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
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 ' ||
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 ' ||
Tom Lane schrieb:
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= f...@meisterderspiele.de 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
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 ' ||