pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL-standard function body
Date: Tue, 30 Jun 2020 15:43:36 -0400
Message-ID: <496794.1593546216@sss.pgh.pa.us> (raw)
In-Reply-To: <20200630192606.brfidtzwjrftcum2@alap3.anarazel.de>
References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com>
	<20200630192606.brfidtzwjrftcum2@alap3.anarazel.de>

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





view thread (90+ messages)  latest in thread

Message-ID: <496794.1593546216@sss.pgh.pa.us>
Permalink:  ../496794.1593546216@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/496794.1593546216@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, peter.eisentraut@2ndquadrant.com
  Subject: Re: SQL-standard function body
  In-Reply-To: <496794.1593546216@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox