From: | Andrew Kiellor <akiellor(at)gmail(dot)com> |
---|---|
To: | Andrew Kiellor <akiellor(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17101: Inconsistent behaviour when querying with anonymous composite types |
Date: | 2021-07-12 08:44:05 |
Message-ID: | CAJ_-DsS+NTXWz472c=jCJHNZ3u7LM=S+500Yi7XJAP1vcFs8KQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Sorry I omitted the output. It is as follows:
DROP TABLE
DROP TYPE
CREATE TYPE
CREATE TABLE
INSERT 0 1
column1
---------
(0)
(1 row)
psql:test.sql:14: ERROR: input of anonymous composite types is not
implemented
LINE 1: SELECT * FROM table1 WHERE column1 = '(0)';
^
column1
---------
(0)
(1 row)
psql:test.sql:20: ERROR: input of anonymous composite types is not
implemented
LINE 1: SELECT * FROM table1 WHERE column1 IN ('(0)');
On Mon, Jul 12, 2021 at 1:38 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17101
> Logged by: Andrew Kiellor
> Email address: akiellor(at)gmail(dot)com
> PostgreSQL version: 13.3
> Operating system: Debian (docker)
> Description:
>
> I've observed some inconsistent behaviour when querying with anonymous
> composite types. The following queries illustrate the observations:
>
> -- cleanup
> DROP TABLE IF EXISTS table1;
> DROP TYPE IF EXISTS type1;
>
> -- scenario
> CREATE TYPE type1 AS (x int);
>
> CREATE TABLE table1 (column1 type1);
>
> INSERT INTO table1 (column1) VALUES ('(0)');
>
> -- passing scenario - equality with typed composite type
> SELECT * FROM table1 WHERE column1 = '(0)'::type1;
>
> -- failing scenario - equality with anonymous composite type
> SELECT * FROM table1 WHERE column1 = '(0)';
>
> -- passing scenario - IN query with multiple anonymous composite types
> SELECT * FROM table1 WHERE column1 IN ('(0)', '(0)');
>
> -- failing scenario - IN query with single anonymous composite type
> SELECT * FROM table1 WHERE column1 IN ('(0)');
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Lætitia Avrot | 2021-07-12 12:56:18 | Re: Statistics updates is delayed when using `commit and chain` |
Previous Message | PG Bug reporting form | 2021-07-12 08:37:31 | BUG #17101: Inconsistent behaviour when querying with anonymous composite types |