Re: [SQL] polymorphic function in 7.4 vs. 8.3

2009-06-11 Thread Richard Rosenberg
On Thursday 11 June 2009 14:49:46 Tom Lane wrote: > Sure you can't move the DB off 7.4? There would be pretty considerable > benefits from adopting some recent release instead. > > regards, tom lane Don't I know it. I am SOL as the machine is hosted/shared out by an externa

Re: [SQL] polymorphic function in 7.4 vs. 8.3

2009-06-11 Thread Richard Rosenberg
Tom, thanks for your prompt reply. I think I may have my head on straight now, this should work: CREATE TABLE atest1 (   id integer NOT NULL,   descr text,   CONSTRAINT atest1_pkey PRIMARY KEY (id) ); CREATE OR REPLACE FUNCTION test1_trg()   RETURNS trigger AS ' DECLARE     some_rec public.ates

[SQL] polymorphic function in 7.4 vs. 8.3

2009-06-11 Thread Richard Rosenberg
I have the following setup which works great in version 8.3 but throws an error in 7.4: CREATE TABLE atest1 ( id integer NOT NULL, descr text, CONSTRAINT atest1_pkey PRIMARY KEY (id) ); CREATE OR REPLACE FUNCTION test_trg() RETURNS "trigger" AS ' DECLARE any_rec wfsys.atest1;