pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@postgresfriends.org>
To: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL-standard function body
Date: Wed, 1 Jul 2020 20:19:25 +0200
Message-ID: <ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org> (raw)
In-Reply-To: <CA+Tgmoah=cK3QCCXkKcd89SjGhza9PibOWepEC=Oo8GB_V9DDw@mail.gmail.com>
References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com>
	<CA+TgmoZ-FXU0iyevFETN0sGYw0RKTSCFxKONGE+2nVJEM5_8OQ@mail.gmail.com>
	<493812.1593541480@sss.pgh.pa.us>
	<494838.1593543098@sss.pgh.pa.us>
	<CA+Tgmoah=cK3QCCXkKcd89SjGhza9PibOWepEC=Oo8GB_V9DDw@mail.gmail.com>

On 7/1/20 3:36 PM, Robert Haas wrote:
> I actually don't have a very clear idea of what the standard has to
> say about SQL-language functions. Does it just say it's a list of
> statements, or does it involve variables and control-flow constructs
> and stuff like that, too?


It's either a single sql statement, or a collection of them between
"begin atomic" and "end".  There are no variables or flow control
constructs or anything like that, just as there are no such things
outside of a function.

(There are a few statements that are not allowed, such as COMMIT.)
-- 
Vik Fearing





view thread (90+ messages)  latest in thread

Message-ID: <ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org>
Permalink:  ../ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org/
Also on:    postgresql.org/message-id/ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: vik@postgresfriends.org, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: SQL-standard function body
  In-Reply-To: <ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org>
  References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com> <CA+TgmoZ-FXU0iyevFETN0sGYw0RKTSCFxKONGE+2nVJEM5_8OQ@mail.gmail.com> <493812.1593541480@sss.pgh.pa.us> <494838.1593543098@sss.pgh.pa.us> <CA+Tgmoah=cK3QCCXkKcd89SjGhza9PibOWepEC=Oo8GB_V9DDw@mail.gmail.com> <ad9572f7-45d7-0095-3fa7-93cb4d70114b@postgresfriends.org>

* 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