pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17298: Error in func pg_get_serial_sequence()
2+ messages / 2 participants
[nested] [flat]
* BUG #17298: Error in func pg_get_serial_sequence()
@ 2021-11-25 17:53 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2021-11-25 17:53 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: salamsp@gmail.com
The following bug has been logged on the website:
Bug reference: 17298
Logged by: Serge Salamatin
Email address: salamsp@gmail.com
PostgreSQL version: 13.5
Operating system: Ubuntu 13.5-2.pgdg20.04+1
Description:
CREATE SEQUENCE IF NOT EXISTS tnd.ui_seq
INCREMENT 1
START 1
MINVALUE 1
MAXVALUE 9223372036854775807
CACHE 1;
CREATE TABLE IF NOT EXISTS tnd.xdwdef
(
defnm citext COLLATE pg_catalog."default" NOT NULL,
ui_id bigint NOT NULL DEFAULT nextval('tnd.ui_seq'::regclass),
def citext COLLATE pg_catalog."default",
CONSTRAINT defnm_pk PRIMARY KEY (defnm)
)
;
select pg_get_serial_sequence('tnd.xdwdef','ui_id');
returns null
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #17298: Error in func pg_get_serial_sequence()
@ 2021-11-25 20:29 David G. Johnston <david.g.johnston@gmail.com>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2021-11-25 20:29 UTC (permalink / raw)
To: salamsp@gmail.com <salamsp@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Thursday, November 25, 2021, PG Bug reporting form <
noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17298
> Logged by: Serge Salamatin
> Email address: salamsp@gmail.com
> PostgreSQL version: 13.5
> Operating system: Ubuntu 13.5-2.pgdg20.04+1
> Description:
>
> CREATE SEQUENCE IF NOT EXISTS tnd.ui_seq
> INCREMENT 1
> START 1
> MINVALUE 1
> MAXVALUE 9223372036854775807
> CACHE 1;
>
> CREATE TABLE IF NOT EXISTS tnd.xdwdef
> (
> defnm citext COLLATE pg_catalog."default" NOT NULL,
> ui_id bigint NOT NULL DEFAULT nextval('tnd.ui_seq'::regclass),
> def citext COLLATE pg_catalog."default",
> CONSTRAINT defnm_pk PRIMARY KEY (defnm)
> )
>
> ;
> select pg_get_serial_sequence('tnd.xdwdef','ui_id');
>
> returns null
>
>
This isn’t a bug. You choose not to use the serial pseudo-type and then
did not perform all of the steps that needed to be done to make an
equivalent setup. In particular, you didn’t make the manually created
sequence owned by the table.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-11-25 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 17:53 BUG #17298: Error in func pg_get_serial_sequence() PG Bug reporting form <noreply@postgresql.org>
2021-11-25 20:29 ` David G. Johnston <david.g.johnston@gmail.com>
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