pgsql: Prohibit identity columns on typed tables and partitions

Started by Peter Eisentrautalmost 9 years ago5 messageshackerscomitters
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

never appliedsuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t37837
psql -h localhost -U postgres

Built from patchset v2 (message #2), July 28, 2026 at 02:12 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t37837_2 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t37837_2 && git checkout t37837_2

Patchset v2 (message #2) is on t37837_2

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net
hackerscomitters

Prohibit identity columns on typed tables and partitions

Those cases currently crash and supporting them is more work then
originally thought, so we'll just prohibit these scenarios for now.

Author: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Reported-by: Мансур Галиев <gomer94@yandex.ru>
Bug: #14866

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/005ac298b1bdc3e9bd19e5ee2bcf7e320ebe4130

Modified Files
--------------
src/backend/parser/parse_utilcmd.c | 13 +++++++++++++
src/test/regress/expected/identity.out | 12 ++++++++++++
src/test/regress/sql/identity.sql | 16 ++++++++++++++++
3 files changed, 41 insertions(+)

#2Michael Paquier
michael@paquier.xyz
In reply to: Peter Eisentraut (#1)
hackerscomitters
Re: pgsql: Prohibit identity columns on typed tables and partitions

On Sat, Dec 9, 2017 at 2:26 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

Prohibit identity columns on typed tables and partitions

Those cases currently crash and supporting them is more work then
originally thought, so we'll just prohibit these scenarios for now.

+                               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                                errmsg("identify columns are not
supported on partitions")));
Er... s/identify/identity/. My fault I guess.
-- 
Michael

Attachments:

t37837_2
identity-errmsg-typo.patchapplication/octet-stream; name=identity-errmsg-typo.patchDownload+1-1
#3Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#2)
hackerscomitters
Re: pgsql: Prohibit identity columns on typed tables and partitions

On Sat, Dec 9, 2017 at 8:43 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:

On Sat, Dec 9, 2017 at 2:26 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

Prohibit identity columns on typed tables and partitions

Those cases currently crash and supporting them is more work then
originally thought, so we'll just prohibit these scenarios for now.

+                               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                                errmsg("identify columns are not
supported on partitions")));
Er... s/identify/identity/. My fault I guess.

Spotted the separate report on it first, so a fix has been pushed.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Magnus Hagander (#3)
hackerscomitters
Re: pgsql: Prohibit identity columns on typed tables and partitions

On 12/9/17 05:47, Magnus Hagander wrote:

On Sat, Dec 9, 2017 at 8:43 AM, Michael Paquier
<michael.paquier@gmail.com <mailto:michael.paquier@gmail.com>> wrote:

On Sat, Dec 9, 2017 at 2:26 AM, Peter Eisentraut <peter_e@gmx.net
<mailto:peter_e@gmx.net>> wrote:

Prohibit identity columns on typed tables and partitions

Those cases currently crash and supporting them is more work then
originally thought, so we'll just prohibit these scenarios for now.

+                               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                                errmsg("identify columns are not
supported on partitions")));
Er... s/identify/identity/. My fault I guess.

Spotted the separate report on it first, so a fix has been pushed.

Please also backpatch to PG10.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Magnus Hagander
magnus@hagander.net
In reply to: Peter Eisentraut (#4)
hackerscomitters
Re: pgsql: Prohibit identity columns on typed tables and partitions

On Sat, Dec 9, 2017 at 10:45 PM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:

On 12/9/17 05:47, Magnus Hagander wrote:

On Sat, Dec 9, 2017 at 8:43 AM, Michael Paquier
<michael.paquier@gmail.com <mailto:michael.paquier@gmail.com>> wrote:

On Sat, Dec 9, 2017 at 2:26 AM, Peter Eisentraut <peter_e@gmx.net
<mailto:peter_e@gmx.net>> wrote:

Prohibit identity columns on typed tables and partitions

Those cases currently crash and supporting them is more work then
originally thought, so we'll just prohibit these scenarios for now.

+ (errcode(ERRCODE_FEATURE_NOT_

SUPPORTED),

+ errmsg("identify columns are not
supported on partitions")));
Er... s/identify/identity/. My fault I guess.

Spotted the separate report on it first, so a fix has been pushed.

Please also backpatch to PG10.

Oops, I completely missed that the original patch was backpatched. Will
fix, thanks!

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;