I'm very embarresed now.
There were another trigger that caused a problem. Now it works.
Thank you all for helping! :-)
2011/2/10 Adrian Klaver :
> On Thursday, February 10, 2011 6:29:58 am A B wrote:
>> Hello.
>>
>> I'm probably doing some very basic error here, but I get
>>
>> ERROR: record "
On Thu, Feb 10, 2011 at 9:38 AM, A B wrote:
> CREATE TRIGGER trigger_foo BEFORE INSERT ON foo for each row EXECUTE
> PROCEDURE trigger_foo();
>
> gives me the same error.
>
Maybe "NEW" needs to be all caps? Also, with the BEFORE trigger,
you'll need to RETURN NEW.
This trigger of mine works jus
On Thursday, February 10, 2011 6:29:58 am A B wrote:
> Hello.
>
> I'm probably doing some very basic error here, but I get
>
> ERROR: record "new" is not assigned yet
> The tuple structure of a not-yet-assigned record is indeterminate.
>
> when I try this small example
>
> create table foo(x
Thanks for the suggestion, but
CREATE TRIGGER trigger_foo BEFORE INSERT ON foo for each row EXECUTE
PROCEDURE trigger_foo();
gives me the same error.
2011/2/10 Vick Khera :
> On Thu, Feb 10, 2011 at 9:29 AM, A B wrote:
>> Can someone help me spot the error? :-)
>>
>
> use a BEFORE INSERT trigg
On Thu, Feb 10, 2011 at 9:29 AM, A B wrote:
> Can someone help me spot the error? :-)
>
use a BEFORE INSERT trigger?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hello.
I'm probably doing some very basic error here, but I get
ERROR: record "new" is not assigned yet
The tuple structure of a not-yet-assigned record is indeterminate.
when I try this small example
create table foo(x int);
create or replace function trigger_foo() returns trigger language
Thanks for pinpointing that out. After including your solution it shows
at least something like "UPDATE OF with id: 123456567". Unfortunately
after using coalesce, too, when building the field variable like: field
= 'field gruppe from: ' || coalesce(OLD.gruppe, '') || ' TO ' ||
coalesce(NEW.gruppe
am Tue, dem 27.11.2007, um 10:38:09 +0100 mailte Christian Rengstl folgendes:
> Hi list,
>
> act = 'DELETION of row with id: ' || OLD.id;
> act = 'UPDATE OF ' || field || ' with id: ' ||
> ...
> INSERT INTO history(aennam, action, table_name) VALUES(current_user,
> act, ta
Hi list,
I have a trigger to log what the users do on the database:
DECLARE _query VARCHAR;
DECLARE valid BOOL;
DECLARE act VARCHAR;
DECLARE tab VARCHAR;
DECLARE field VARCHAR;
BEGIN
IF(TG_OP = 'DELETE') THEN
act = 'DELETION of row with id: ' || OLD.id;
ELSIF(TG_OP = 'UPDATE') THEN
IF N
Well, after hours to debug this issue, I found the problem.
There is a misspelled word, thanks and sorry for waste your time.
Alejandro
2005/7/21, Alejandro D. Burne <[EMAIL PROTECTED]>:
> Thanks Michael for your reply, I've attached the db structure and some
> data to add, this is the command th
On Wed, Jul 20, 2005 at 03:00:42PM -0300, Alejandro D. Burne wrote:
> Hi, I'll be trying to write a my first trigger which fire when an user
> makes an insert into a table; this insert records in others tables.
> But when I try to insert a record in trigger's table generate an error:
> - Syntax e
Hi, I'll be trying to write a my first trigger which fire when an user
makes an insert into a table; this insert records in others tables.
But when I try to insert a record in trigger's table generate an error:
- Syntax error near "into" in char 9. -
This is the trigger.
CREATE OR REPLACE FUNC
On Sat, 4 Dec 2004, Henry Molina wrote:
> drop table t1;
> drop table t2;
> create table t1 (id integer);
> create table t2 (id integer);
> CREATE OR REPLACE FUNCTION myfunc() RETURNS trigger AS '
> BEGIN
> insert into t2 values(NEW.id);
> END;
> ' LANGUAGE plpgsql;
>
> CREATE TRIGGER
>
On Sat, Dec 04, 2004 at 11:53:46PM -0500, Henry Molina wrote:
> drop table t1;
> drop table t2;
> create table t1 (id integer);
> create table t2 (id integer);
> CREATE OR REPLACE FUNCTION myfunc() RETURNS trigger AS '
> BEGIN
> insert into t2 values(NEW.id);
> END;
> ' LANGUAGE plpgsql;
>
Hi all
I'm having a problem with PostgreSQL 7.4.6-2
I do:
drop table t1;
drop table t2;
create table t1 (id integer);
create table t2 (id integer);
CREATE OR REPLACE FUNCTION myfunc() RETURNS trigger AS '
BEGIN
insert into t2 values(NEW.id);
END;
' LANGUAGE plpgsql;
CREATE TRIGGER
Jamie Deppeler wrote:
UPDATE wip.resource
set "name" = datarecord.borname
where wip.resource."primary" = OLD."primary";
get the following error
Error: record "old" is not yet assigned
If called from an INSERT then OLD is undefined, since there is no old
version of the row.
--
Richar
Hi
Finally getting this trigger ro work have one last problem, im trying to
use Trigger variables
sample code
UPDATE wip.resource
set "name" = datarecord.borname
where wip.resource."primary" = OLD."primary";
get the following error
Error: record "old" is not yet assigned
would be grea
Sarah Officer wrote:
>
> > delete from istatus where status_code = 'A1';
> ERROR: fmgr_info: function 18848: cache lookup failed
>
> What is the problem with the cache lookup? Any suggestions would be
> appreciated.
I seem to recall that kind of message often shows up when you have
dropped an
I am trying to create a simple trigger function. With some help
from the mailing list, I managed to create a trigger and functions.
Unfortunately I get an error message when I delete from the table
which has the trigger. Can anyone help me spot the error? Here's
what I have done:
CREATE FUNC
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 06, 2000 5:15 PM
I'm using the fti function that is included with the source, and seem to
have run into a problem with the trigger call.
I have a full text index with only around 556645 entries
20 matches
Mail list logo