diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-02-26 16:04:59 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-02-26 16:04:59 +0900 |
commit | 449e798c77ed9a03f8bb04e5d324d4e3cfbbae8e (patch) | |
tree | 91f643e47147d44a95fc707908549de2d539eb5d /src/backend/utils/adt/jsonb_util.c | |
parent | 025f0a6f9113efe89bb65b9efe0cb96a5d7c7ad1 (diff) | |
download | postgresql-449e798c77ed9a03f8bb04e5d324d4e3cfbbae8e.tar.gz postgresql-449e798c77ed9a03f8bb04e5d324d4e3cfbbae8e.zip |
Introduce sequence_*() access functions
Similarly to tables and indexes, these functions are able to open
relations with a sequence relkind, which is useful to make a distinction
with the other relation kinds. Previously, commands/sequence.c used a
mix of table_{close,open}() and relation_{close,open}() routines when
manipulating sequence relations, so this clarifies the code.
A direct effect of this change is to align the error messages produced
when attempting DDLs for sequences on relations with an unexpected
relkind, like a table or an index with ALTER SEQUENCE, providing an
extra error detail about the relkind of the relation used in the DDL
query.
Author: Michael Paquier
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/ZWlohtKAs0uVVpZ3@paquier.xyz
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions