pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedinvalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
8+ messages / 4 participants
[nested] [flat]
* invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
@ 2024-12-12 14:08 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:27 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 jian he <jian.universality@gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: Mike Bayer @ 2024-12-12 14:08 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org
this occurs on postgresql 17.2 and did not occur on any previous version including 16, 15, 14. apologies if this has already been reported but I didn't see any means of looking up existing issues
complete steps below
$ psql -U scott -h pg17 test
Password for user scott:
psql (16.3, server 17.2)
WARNING: psql major version 16, server major version 17.
Some psql features might not work.
Type "help" for help.
test=> CREATE DOMAIN not_nullable_domain AS TEXT NOT NULL;
CREATE DOMAIN
test=> SELECT
domain_constraints.condefs, domain_constraints.connames, pg_catalog.pg_collation.collname
FROM pg_catalog.pg_type
JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_type.typnamespace
LEFT OUTER JOIN pg_catalog.pg_collation ON pg_catalog.pg_type.typcollation = pg_catalog.pg_collation.oid
LEFT OUTER JOIN
(SELECT pg_catalog.pg_constraint.contypid AS contypid,
array_agg(pg_catalog.pg_get_constraintdef(pg_catalog.pg_constraint.oid, true)) AS condefs,
array_agg(CAST(pg_catalog.pg_constraint.conname AS TEXT)) AS connames
FROM pg_catalog.pg_constraint
WHERE pg_catalog.pg_constraint.contypid != 0
GROUP BY pg_catalog.pg_constraint.contypid) AS domain_constraints ON pg_catalog.pg_type.oid = domain_constraints.contypid
WHERE pg_catalog.pg_type.typtype = 'd' ORDER BY pg_catalog.pg_namespace.nspname, pg_catalog.pg_type.typname;
ERROR: invalid constraint type "n"
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
@ 2024-12-12 14:14 ` David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:37 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2024-12-12 14:14 UTC (permalink / raw)
To: Mike Bayer <mike_mp@zzzcomputing.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Thursday, December 12, 2024, Mike Bayer <mike_mp@zzzcomputing.com> wrote:
> this occurs on postgresql 17.2 and did not occur on any previous version
> including 16, 15, 14. apologies if this has already been reported but I
> didn't see any means of looking up existing issues
https://www.postgresql.org/search/?m=1
$ psql -U scott -h pg17 test
> Password for user scott:
> psql (16.3, server 17.2)
> WARNING: psql major version 16, server major version 17.
> Some psql features might not work.
This is apparently just such a feature…
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
@ 2024-12-12 14:37 ` David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:55 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
0 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2024-12-12 14:37 UTC (permalink / raw)
To: Mike Bayer <mike_mp@zzzcomputing.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Thu, Dec 12, 2024 at 7:14 AM David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Thursday, December 12, 2024, Mike Bayer <mike_mp@zzzcomputing.com>
> wrote:
>
>>
>> $ psql -U scott -h pg17 test
>> Password for user scott:
>> psql (16.3, server 17.2)
>> WARNING: psql major version 16, server major version 17.
>> Some psql features might not work.
>
>
> This is apparently just such a feature…
>
>
My bad, ignore this, I saw this and ended up thinking the complaint was
against psql, not the server-internals.
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:37 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
@ 2024-12-12 14:55 ` Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 15:48 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Mike Bayer @ 2024-12-12 14:55 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Thu, Dec 12, 2024, at 9:37 AM, David G. Johnston wrote:
> On Thu, Dec 12, 2024 at 7:14 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
>> On Thursday, December 12, 2024, Mike Bayer <mike_mp@zzzcomputing.com> wrote:
>>>
>>> $ psql -U scott -h pg17 test
>>> Password for user scott:
>>> psql (16.3, server 17.2)
>>> WARNING: psql major version 16, server major version 17.
>>> Some psql features might not work.
>>
>> This is apparently just such a feature…
>>
>
> My bad, ignore this, I saw this and ended up thinking the complaint was against psql, not the server-internals.
>
> David J.
correct, this is observed using all Python postgresql drivers, I was using psql to make an easy repro
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:37 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:55 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
@ 2024-12-12 15:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-12-12 15:59 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2024-12-12 15:48 UTC (permalink / raw)
To: Mike Bayer <mike_mp@zzzcomputing.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
"Mike Bayer" <mike_mp@zzzcomputing.com> writes:
> correct, this is observed using all Python postgresql drivers, I was using psql to make an easy repro
As Jian said, this was reported and fixed last month.
(I checked that your example works against v17 branch tip.)
Should appear in 17.3.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:37 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:55 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 15:48 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Tom Lane <tgl@sss.pgh.pa.us>
@ 2024-12-12 15:59 ` Mike Bayer <mike_mp@zzzcomputing.com>
0 siblings, 0 replies; 8+ messages in thread
From: Mike Bayer @ 2024-12-12 15:59 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Thu, Dec 12, 2024, at 10:48 AM, Tom Lane wrote:
> "Mike Bayer" <mike_mp@zzzcomputing.com> writes:
>> correct, this is observed using all Python postgresql drivers, I was using psql to make an easy repro
>
> As Jian said, this was reported and fixed last month.
> (I checked that your example works against v17 branch tip.)
> Should appear in 17.3.
>
> regards, tom lane
thanks for double checking!
- mike
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
@ 2024-12-12 14:27 ` jian he <jian.universality@gmail.com>
2024-12-12 14:31 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 jian he <jian.universality@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: jian he @ 2024-12-12 14:27 UTC (permalink / raw)
To: Mike Bayer <mike_mp@zzzcomputing.com>; +Cc: pgsql-bugs@lists.postgresql.org
On Thu, Dec 12, 2024 at 10:09 PM Mike Bayer <mike_mp@zzzcomputing.com> wrote:
>
> this occurs on postgresql 17.2 and did not occur on any previous version including 16, 15, 14. apologies if this has already been reported but I didn't see any means of looking up existing issues
>
https://git.postgresql.org/cgit/postgresql.git/commit/?id=09d09d4297b9acbc2848ec35e8bf030d6c1fae18
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:27 ` Re: invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 jian he <jian.universality@gmail.com>
@ 2024-12-12 14:31 ` jian he <jian.universality@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: jian he @ 2024-12-12 14:31 UTC (permalink / raw)
To: Mike Bayer <mike_mp@zzzcomputing.com>; +Cc: pgsql-bugs@lists.postgresql.org
On Thu, Dec 12, 2024 at 10:27 PM jian he <jian.universality@gmail.com> wrote:
>
> On Thu, Dec 12, 2024 at 10:09 PM Mike Bayer <mike_mp@zzzcomputing.com> wrote:
> >
> > this occurs on postgresql 17.2 and did not occur on any previous version including 16, 15, 14. apologies if this has already been reported but I didn't see any means of looking up existing issues
> >
>
> https://git.postgresql.org/cgit/postgresql.git/commit/?id=09d09d4297b9acbc2848ec35e8bf030d6c1fae18
sorry. This link is for master.
it was fixed.
the correct link is
https://git.postgresql.org/cgit/postgresql.git/commit/?h=REL_17_STABLE&id=6e793582bc663fb7652834...
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2024-12-12 15:59 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-12 14:08 invalid constraint type "n" when using pg_catalog.pg_get_constraintdef() on pg17, regression from pg16 Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:14 ` David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:37 ` David G. Johnston <david.g.johnston@gmail.com>
2024-12-12 14:55 ` Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 15:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-12-12 15:59 ` Mike Bayer <mike_mp@zzzcomputing.com>
2024-12-12 14:27 ` jian he <jian.universality@gmail.com>
2024-12-12 14:31 ` jian he <jian.universality@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