On Tue, 20 Aug 2002, Martin Marques wrote:
> Quoting Stephan Szabo <[EMAIL PROTECTED]>:
>
> >
> > > The problemas are two:
> > >
> > > 1) when I try to create the trigger, it says that the function doesn't
> > exist.
> > > Why is this happening?
> >
> > You should probably show us what you were t
Quoting Stephan Szabo <[EMAIL PROTECTED]>:
>
> > The problemas are two:
> >
> > 1) when I try to create the trigger, it says that the function doesn't
> exist.
> > Why is this happening?
>
> You should probably show us what you were trying to do, but I'm going to
> guess that the function doesn
On Tue, 20 Aug 2002, Martin Marques wrote:
> I'm trying to build a trigger that will update a timestamp field in a table with
> the current timestamp, and I just can't make it work.
>
> The problemas are two:
>
> 1) when I try to create the trigger, it says that the function doesn't exist.
> Why
I'm trying to build a trigger that will update a timestamp field in a table with
the current timestamp, and I just can't make it work.
The problemas are two:
1) when I try to create the trigger, it says that the function doesn't exist.
Why is this happening?
2) How does the trigger tell the func
Title: Functions and Triggers
Is there anyone that can point me into the right direction for creating a function and trigger that will do something along these lines:
I have a table that has router card types and a status on them:
TEST_RECORD
CARD STATUS
1
Title: Functions and Triggers
Is there anyone that can point me into the right direction for creating a function and trigger that will do something along these lines:
I have a table that has router card types and a status on them:
TEST_RECORD
CARD STATUS
1
Title: Functions and Triggers
I need help on creating a sql function that will check four rows in a table based on that check it will update another row on a different table. I want to use this function in a trigger statement.
Table 1 (Test Type)
id cat sub-cat test stat
Cedar Cox wrote:
>
> CREATE FUNCTION lastupdated() RETURNS opaque AS '
> begin
> new.last_updated := CURRENT_TIMESTAMP;
> return new;
> end;
> ' LANGUAGE 'plpgsql';
>
> CREATE TRIGGER trigname BEFORE INSERT OR UPDATE on tblname
> FOR EACH ROW EXECUTE PROCEDURE lastupdated();
>
> Note: you co
CREATE FUNCTION lastupdated() RETURNS opaque AS '
begin
new.last_updated := CURRENT_TIMESTAMP;
return new;
end;
' LANGUAGE 'plpgsql';
CREATE TRIGGER trigname BEFORE INSERT OR UPDATE on tblname
FOR EACH ROW EXECUTE PROCEDURE lastupdated();
Note: you could use now() instead of CURRENT_TIMES
From: "Norbert Schollum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 26, 2001 10:24 AM
Subject: [SQL] Functions and Triggers
> Hello there!
>
> here is what i want to realize:
>
> a trigger, that puts a now() in the last_updated field,
Hello there!
here is what i want to realize:
a trigger, that puts a now() in the last_updated field, on any update of
that table.
i read the manual but i wasnt able to make a working function.
what is the return value here? is there any or is it void?
has somebody a example for me that is simi
On Wed, Mar 07, 2001 at 03:03:59PM +0100, Andrzej Roszkowski wrote:
> Hello!
>
> It is possible to pass ie. insert fields and values to sql function in
> trigger? I want to define a trigger on insert (select delete etc.) and log
> some values in different table(s).
Sure, see docs about SPI in
Hello!
It is possible to pass ie. insert fields and values to sql function in
trigger? I want to define a trigger on insert (select delete etc.) and log
some values in different table(s).
--
"Code reviews are like sex, just anyone can do it, but skill and training can
make you a lot better a
13 matches
Mail list logo