From: | "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | opaque function not accepted (without error message) |
Date: | 2002-08-13 12:26:31 |
Message-ID: | 200208131234.g7DCY7iO030652@artemis.cuci.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello world,
(postgresql 7.2.1-5 on a completely patched redhat 7.3 box)
In my db I have a function that will be used as a trigger when updating
records.
drop function au_col();
create function au_col()
returns opaque
as 'begin
new.mut_id = current_user;
new.mut_timestamp = CURRENT_TIMESTAMP;
return new;
end;'
language 'plpgsql';
All seems well, "CREATE" is echoed. Later I found out the function
wasn't in the database, \df in psql doesn't show it. After some
experimenting I found out that apparantly the return type opaque is the
evildoer. When I use an integer type:
drop function au_col();
create function au_col()
returns integer
as 'begin
new.mut_id = current_user;
new.mut_timestamp = CURRENT_TIMESTAMP;
return 1;
end;'
language 'plpgsql';
the function is created, and \df shows it. Is it impossible to create
an opaque function (according to my books this is quite possible)? Am I
doing something wrong?
TIA for any reactions!
--
Jules Alberts
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Gibbs | 2002-08-13 12:40:31 | Re: opaque function not accepted (without error message) |
Previous Message | Oliver Elphick | 2002-08-13 12:18:21 | Re: [GENERAL] Linux Largefile Support In Postgresql RPMS |