Re: Dazed and Confused - Mailing list pgsql-general

From Tom Lane
Subject Re: Dazed and Confused
Date
Msg-id 25856.1076946347@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dazed and Confused  (Robert Creager <Robert_Creager@LogicalChaos.org>)
List pgsql-general
Robert Creager <Robert_Creager@LogicalChaos.org> writes:
> I believe OPAQUE is deprecated, and the return type of TRIGGER should be used.

Correct.

> But, I still have a trigger which I have not updated that is OPAQUE, and it
> loads just find after emitting:

> psql:dbTriggers.sql:33: WARNING:  changing return type of function
> observations_trigger from "opaque" to "trigger"

Right, there is a narrow hack in CREATE TRIGGER that does that to allow
loading of existing dump scripts.  But I think what Terry is trying to
do is modify an existing trigger function with

    CREATE OR REPLACE trigfunc() RETURNS OPAQUE AS ...

and the system won't (and shouldn't) let him change the function return
type back to OPAQUE.

The only answer is to replace OPAQUE by TRIGGER in your function
scripts.

            regards, tom lane

pgsql-general by date:

Previous
From: "C G"
Date:
Subject: Inputting columns of data
Next
From: Karam Chand
Date:
Subject: PGSQL C API()