Re: Stored procedure code no longer stored in v14 and v15, changed behaviour - Mailing list pgsql-general

From Tom Lane
Subject Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Date
Msg-id 1937424.1669996938@sss.pgh.pa.us
Whole thread Raw
In response to Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  (Pasi Oja-Nisula <pon@iki.fi>)
Responses Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  (Christophe Pettus <xof@thebuild.com>)
Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  (Pasi Oja-Nisula <pon@iki.fi>)
Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  (raf <raf@raf.org>)
Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  ("Martijn Tonies \(Upscene Productions\)" <m.tonies@upscene.com>)
List pgsql-general
Pasi Oja-Nisula <pon@iki.fi> writes:
> I would be perfectly satisfied, if the sql that produced the procedure
> would be stored "as is" read-only copy when it was compiled.

As I mentioned upthread, we used to have that behavior (store both
compiled form and original text) for column default expressions and
CHECK constraint expressions.  We got rid of that because it caused
far more confusion, and bugs, than it was worth.  Not bugs in the
database, but faulty behavior in applications that thought they
could trust the text form to be accurate.  I don't intend to
fail to learn from that history.

Also, we've *never* had storage of the original text for views.
I'm a little mystified by people claiming they use original
text for vetting functions when they clearly have no equivalent
ability for views ... or are your applications completely
view-free?

If you want an audit comparison point, I'd suggest capturing
the result of pg_get_functiondef or one of its sibling functions
just after creating your function.  "pg_dump -s" is another
pretty credible mechanism for capturing schema details.

> If an object
> rename makes it invalid, tweak a bit telling so, but don't change the text
> until next alter procedure is run.

I'm astonished at the number of people who think that poorly-implemented
Oracle behavior is something we should emulate.

            regards, tom lane



pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Next
From: Christophe Pettus
Date:
Subject: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour