pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Identity columns
Date: Thu, 06 Apr 2017 12:44:08 +0000
Message-ID: <E1cw6lk-0008UE-KZ@gemulon.postgresql.org> (raw )
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Identity columns
This is the SQL standard-conforming variant of PostgreSQL's serial
columns. It fixes a few usability issues that serial columns have:
- CREATE TABLE / LIKE copies default but refers to same sequence
- cannot add/drop serialness with ALTER TABLE
- dropping default does not drop sequence
- need to grant separate privileges to sequence
- other slight weirdnesses because serial is some kind of special macro
Reviewed-by: Vitaly Burovoy <vitaly.burovoy@gmail.com>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3217327053638085d24dd4d276e7c1f7ac2c4c6b
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 11 +
doc/src/sgml/information_schema.sgml | 11 +-
doc/src/sgml/ref/alter_table.sgml | 47 +++-
doc/src/sgml/ref/copy.sgml | 7 +
doc/src/sgml/ref/create_table.sgml | 65 ++++-
doc/src/sgml/ref/insert.sgml | 41 +++
src/backend/access/common/tupdesc.c | 6 +
src/backend/catalog/dependency.c | 7 +
src/backend/catalog/genbki.pl | 7 +-
src/backend/catalog/heap.c | 15 +-
src/backend/catalog/index.c | 1 +
src/backend/catalog/information_schema.sql | 17 +-
src/backend/catalog/pg_depend.c | 52 ++--
src/backend/catalog/sql_features.txt | 12 +-
src/backend/commands/sequence.c | 101 +++++--
src/backend/commands/tablecmds.c | 295 ++++++++++++++++++-
src/backend/executor/execExpr.c | 12 +
src/backend/executor/execExprInterp.c | 23 ++
src/backend/nodes/copyfuncs.c | 23 ++
src/backend/nodes/equalfuncs.c | 18 ++
src/backend/nodes/nodeFuncs.c | 11 +
src/backend/nodes/outfuncs.c | 9 +
src/backend/nodes/readfuncs.c | 1 +
src/backend/parser/analyze.c | 2 +
src/backend/parser/gram.y | 134 ++++++++-
src/backend/parser/parse_utilcmd.c | 360 +++++++++++++++++++-----
src/backend/rewrite/rewriteHandler.c | 56 +++-
src/backend/utils/adt/ruleutils.c | 8 +
src/backend/utils/cache/lsyscache.c | 32 +++
src/backend/utils/cache/relcache.c | 1 +
src/backend/utils/errcodes.txt | 1 +
src/bin/pg_dump/pg_dump.c | 95 ++++++-
src/bin/pg_dump/pg_dump.h | 3 +
src/bin/pg_dump/t/002_pg_dump.pl | 87 ++++++
src/bin/psql/describe.c | 27 +-
src/bin/psql/tab-complete.c | 18 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/dependency.h | 8 +-
src/include/catalog/pg_attribute.h | 24 +-
src/include/catalog/pg_class.h | 2 +-
src/include/commands/sequence.h | 2 +
src/include/executor/execExpr.h | 8 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 27 +-
src/include/nodes/primnodes.h | 14 +
src/include/parser/kwlist.h | 2 +
src/include/utils/lsyscache.h | 1 +
src/test/regress/expected/create_table_like.out | 47 ++++
src/test/regress/expected/identity.out | 322 +++++++++++++++++++++
src/test/regress/expected/sequence.out | 4 +-
src/test/regress/expected/truncate.out | 30 ++
src/test/regress/parallel_schedule | 5 +
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/create_table_like.sql | 14 +
src/test/regress/sql/identity.sql | 192 +++++++++++++
src/test/regress/sql/sequence.sql | 2 +-
src/test/regress/sql/truncate.sql | 18 ++
57 files changed, 2140 insertions(+), 202 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
view thread (5+ messages) latest in thread
Message-ID: <E1cw6lk-0008UE-KZ@gemulon.postgresql.org>
Permalink: ../E1cw6lk-0008UE-KZ@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1cw6lk-0008UE-KZ@gemulon.postgresql.org
copy link · copy postgr.es
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-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: Identity columns
In-Reply-To: <E1cw6lk-0008UE-KZ@gemulon.postgresql.org>
References: <E1cw6lk-0008UE-KZ@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