[EMAIL PROTECTED] ("Naeem Bari") writes:
> I understand. Makes sense. Is there anyway for my trigger function to
> "know" that it is being called on a delete or on an update? Because I do
> need to "return new" on update... and I really don't want to write 2
> different functions, one for update a
Sent by: cc: <[EMAIL PROTECTED]>
[EMAIL PROTECTED] Subject: Re: [GENERAL] ON DELETE
trigger blocks delete fr
On Mon, 2004-10-25 at 15:09 -0500, Naeem Bari wrote:
> Ok, a really newbie question - I think I will switch to using "after"
> rather than "before" - but can I modify the trigger statement without
> dropping the trigger function?
CREATE OR REPLACE FUNCTION ...
--
Oliver Elphick
p!
naeem
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 2:48 PM
To: Naeem Bari
Cc: [EMAIL PROTECTED]
Subject: Re: [GENERAL] ON DELETE trigger blocks delete from my table
"Naeem Bari" <[EMAIL PROTECTED]> writes:
CREATE OR REPLACE FU
On 10/25/2004 3:47 PM, Tom Lane wrote:
"Naeem Bari" <[EMAIL PROTECTED]> writes:
CREATE OR REPLACE FUNCTION public.func_job_status_upd()
RETURNS trigger AS
'
begin
insert into x_job_status values ( OLD.job_id, OLD.job_status_type_id,
OLD.status_date, OLD.notes, OLD.edit_person_id, OLD.edit_date)
D]
Subject: Re: [GENERAL] ON DELETE trigger blocks delete from my table
On 10/25/2004 3:33 PM, Franco Bruno Borghesi wrote:
> I've made a test case, and setting the trigger BEFORE DELETE doesn't
> delete the rows from the table (but it does execute the trigger, and
it
> does
October 25, 2004 2:48 PM
To: Naeem Bari
Cc: [EMAIL PROTECTED]
Subject: Re: [GENERAL] ON DELETE trigger blocks delete from my table
"Naeem Bari" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION public.func_job_status_upd()
> RETURNS trigger AS
>
On 10/25/2004 3:33 PM, Franco Bruno Borghesi wrote:
I've made a test case, and setting the trigger BEFORE DELETE doesn't
delete the rows from the table (but it does execute the trigger, and it
does insert the rows in the audit table), I dont' know why :(.
Because the internal variable for NEW is in
"Naeem Bari" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION public.func_job_status_upd()
> RETURNS trigger AS
> '
> begin
> insert into x_job_status values ( OLD.job_id, OLD.job_status_type_id,
> OLD.status_date, OLD.notes, OLD.edit_person_id, OLD.edit_date);
> return new;
> end;
>
On 10/25/2004 2:56 PM, Naeem Bari wrote:
Hi,
I am using postgres 7.4.5 on Redhat Enterprise Linux 3.
My background is really on Oracle, and I am porting a largish database
over to postgres.
Here is my problem:
On oracle, I had a table with an "on update or delete" trigger that
copied the cu
I've made a test case, and setting the trigger BEFORE DELETE doesn't delete the rows from the table (but it does execute the trigger, and it does insert the rows in the audit table), I dont' know why .
Anyway, setting the trigger AFTER DELETE works ok.
On Mon, 2004-10-25 at 15:56, Naeem Bari
Hi,
I am using postgres 7.4.5 on Redhat Enterprise Linux 3.
My background is really on Oracle, and I am porting a
largish database over to postgres.
Here is my problem:
On oracle, I had a table with an “on update or delete”
trigger that copied the current row out to an audit
12 matches
Mail list logo