pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14862: create table with missing sequence bug
3+ messages / 3 participants
[nested] [flat]
* BUG #14862: create table with missing sequence bug
@ 2017-10-19 17:04 gezeala@gmail.com
2017-10-19 17:46 ` Re: BUG #14862: create table with missing sequence bug Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: gezeala@gmail.com @ 2017-10-19 17:04 UTC (permalink / raw)
To: pgsql-bugs; +Cc: gezeala@gmail.com
The following bug has been logged on the website:
Bug reference: 14862
Logged by: pgyayix
Email address: gezeala@gmail.com
PostgreSQL version: 9.4.9
Operating system: CentOS 7
Description:
--on a fresh db:
CREATE SCHEMA testschema;
--sequence is missing
--create table fails:
CREATE TABLE testschema.sometable1 (
col1 bigint DEFAULT
nextval('missingschema.missingsequence_id1'::regclass) NOT NULL,
col2 text
);
--sequence is missing
--create table works fine:
CREATE TABLE testschema.sometable2 (
col1 bigint DEFAULT
nextval(('missingschema.missingsequence_id2'::text)::regclass) NOT NULL,
col2 text
);
Only difference is sometable2 sequence definition has ::text::regclass.
Thanks.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14862: create table with missing sequence bug
2017-10-19 17:04 BUG #14862: create table with missing sequence bug gezeala@gmail.com
@ 2017-10-19 17:46 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-10-19 18:33 ` Re: BUG #14862: create table with missing sequence bug mgbii bax <gezeala@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2017-10-19 17:46 UTC (permalink / raw)
To: gezeala@gmail.com; +Cc: pgsql-bugs
gezeala@gmail.com writes:
> --on a fresh db:
> CREATE SCHEMA testschema;
> --sequence is missing
> --create table fails:
> CREATE TABLE testschema.sometable1 (
> col1 bigint DEFAULT
> nextval('missingschema.missingsequence_id1'::regclass) NOT NULL,
> col2 text
> );
> --sequence is missing
> --create table works fine:
> CREATE TABLE testschema.sometable2 (
> col1 bigint DEFAULT
> nextval(('missingschema.missingsequence_id2'::text)::regclass) NOT NULL,
> col2 text
> );
> Only difference is sometable2 sequence definition has ::text::regclass.
This looks like the expected and documented behavior to me. See the
"Note" regarding early vs. late binding of sequence names at
https://www.postgresql.org/docs/current/static/functions-sequence.html
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14862: create table with missing sequence bug
2017-10-19 17:04 BUG #14862: create table with missing sequence bug gezeala@gmail.com
2017-10-19 17:46 ` Re: BUG #14862: create table with missing sequence bug Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-10-19 18:33 ` mgbii bax <gezeala@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: mgbii bax @ 2017-10-19 18:33 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
On Thu, Oct 19, 2017 at 10:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> gezeala@gmail.com writes:
>> --on a fresh db:
>> CREATE SCHEMA testschema;
>
>> --sequence is missing
>> --create table fails:
>> CREATE TABLE testschema.sometable1 (
>> col1 bigint DEFAULT
>> nextval('missingschema.missingsequence_id1'::regclass) NOT NULL,
>> col2 text
>> );
>
>> --sequence is missing
>> --create table works fine:
>> CREATE TABLE testschema.sometable2 (
>> col1 bigint DEFAULT
>> nextval(('missingschema.missingsequence_id2'::text)::regclass) NOT NULL,
>> col2 text
>> );
>
>> Only difference is sometable2 sequence definition has ::text::regclass.
>
> This looks like the expected and documented behavior to me. See the
> "Note" regarding early vs. late binding of sequence names at
>
> https://www.postgresql.org/docs/current/static/functions-sequence.html
>
> regards, tom lane
Thanks for looking into it.
--
regards
gezeala bacuño II
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-10-19 18:33 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 17:04 BUG #14862: create table with missing sequence bug gezeala@gmail.com
2017-10-19 17:46 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-10-19 18:33 ` mgbii bax <gezeala@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