Re: SQL-standard function body - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SQL-standard function body
Date
Msg-id 496794.1593546216@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL-standard function body  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2020-06-30 19:49:04 +0200, Peter Eisentraut wrote:
>> The function body is parsed at function definition time and stored as
>> expression nodes in probin.  So at run time, no further parsing is
>> required.

> Isn't a consequence of that that we'd get a lot more errors if any DDL
> is done to tables involved in the query? In contrast to other languages
> we'd not be able to handle column type changes etc, right?

I suppose it'd act like column references in a view, ie the dependency
mechanisms would forbid you from changing/dropping any column mentioned
in one of these functions.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: warnings for invalid function casts
Next
From: Mark Dilger
Date:
Subject: Re: new heapcheck contrib module