opaque function not accepted (without error message) - Mailing list pgsql-general

From Jules Alberts
Subject opaque function not accepted (without error message)
Date
Msg-id 200208131234.g7DCY7iO030652@artemis.cuci.nl
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: pginfo
Date:
Subject: Very slow insert speed
Next
From: "Peter Gibbs"
Date:
Subject: Re: opaque function not accepted (without error message)