From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow RECORD and RECORD[] to be specified in function coldeflist
Date: Thu, 31 Jan 2019 00:25:42 +0000
Message-ID: <E1gp0Ao-0005lS-V2@gemulon.postgresql.org> (raw)
Allow RECORD and RECORD[] to be specified in function coldeflists.
We can't allow these pseudo-types to be used as table column types,
because storing an anonymous record value in a table would result
in data that couldn't be understood by other sessions. However,
it seems like there's no harm in allowing the case in a column
definition list that's specifying what a function-returning-record
returns. The data involved is all local to the current session,
so we should be just as able to resolve its actual tuple type as
we are for the function-returning-record's top-level tuple output.
Elvis Pranskevichus, with cosmetic changes by me
Discussion: https://postgr.es/m/11038447.kQ5A9Uj5xi@hammer.magicstack.net
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5f5c01459053c0975b89b5aa1a3d705e677348ae
Modified Files
--------------
src/backend/catalog/heap.c | 48 +++++++++++++++++++++++++---------
src/backend/catalog/index.c | 2 +-
src/backend/commands/tablecmds.c | 4 +--
src/backend/parser/parse_relation.c | 10 +++++--
src/include/catalog/heap.h | 8 ++++--
src/test/regress/expected/rowtypes.out | 11 ++++++++
src/test/regress/sql/rowtypes.sql | 6 +++++
7 files changed, 70 insertions(+), 19 deletions(-)
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Allow RECORD and RECORD[] to be specified in function coldeflist
In-Reply-To: <E1gp0Ao-0005lS-V2@gemulon.postgresql.org>
References: <E1gp0Ao-0005lS-V2@gemulon.postgresql.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