pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17515: Change in behaviour of a composite type within a domain
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2022-06-10 1218780cce d3ef5c3ef4 199aac8b2f 254cd7f31f 77c1d92cba  Un-break whole-row Vars referencing domain-over-composite types.
* BUG #17515: Change in behaviour of a composite type within a domain
@ 2022-06-09 20:42 PG Bug reporting form <noreply@postgresql.org>
  2022-06-10 13:51 ` Re: BUG #17515: Change in behaviour of a composite type within a domain Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2022-06-09 20:42 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: dan.kubb@gmail.com

The following bug has been logged on the website:

Bug reference:      17515
Logged by:          Dan Kubb
Email address:      dan.kubb@gmail.com
PostgreSQL version: 14.3
Operating system:   All
Description:        

I noticed a regression in 13.7 and 14.3 in the behaviour of composite types
within a domain. Here is a simplified reproduction:

BEGIN;

-- Create composite type
CREATE TYPE my_composite_type AS (
  col1 boolean,
  col2 boolean
);

-- Create domain wrapping the composite type
CREATE DOMAIN my_domain AS my_composite_type NOT NULL;

-- Create function to test composite type
CREATE FUNCTION test_my_composite_type()
RETURNS my_composite_type
LANGUAGE sql
AS $$
  SELECT (true, true)
$$;

-- Create function to test domain
CREATE FUNCTION test_my_domain()
RETURNS my_domain
LANGUAGE sql
AS $$
  SELECT (true, true)
$$;

-- Works on 13.6/14.2 and 13.7/14.3
SELECT test_my_composite_type FROM test_my_composite_type();

-- Works on 13.6/14.2, but pg 13.7/14.3 this returns the error:
-- ERROR:  type my_domain is not composite
SELECT test_my_domain FROM test_my_domain();

ROLLBACK;

-- 

Dan Kubb



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17515: Change in behaviour of a composite type within a domain
  2022-06-09 20:42 BUG #17515: Change in behaviour of a composite type within a domain PG Bug reporting form <noreply@postgresql.org>
@ 2022-06-10 13:51 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-06-10 13:51 UTC (permalink / raw)
  To: dan.kubb@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> I noticed a regression in 13.7 and 14.3 in the behaviour of composite types
> within a domain. Here is a simplified reproduction:

Argh, looks like I broke this in ec62cb0aa.  Will fix, thanks for
the report!

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-06-10 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 20:42 BUG #17515: Change in behaviour of a composite type within a domain PG Bug reporting form <noreply@postgresql.org>
2022-06-10 13:51 ` Tom Lane <tgl@sss.pgh.pa.us>

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