pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: james.inform@pharmapp.de, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD)
Date: Fri, 28 Jan 2022 16:43:18 -0500
Message-ID: <2807139.1643406198@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRDMMTXX1B56P=7cvJvDSOYuhrVE_PBch7EFOV8-qOHNzQ@mail.gmail.com>
References: <17387-5dfe54b988444963@postgresql.org>
	<CAFj8pRCdDOs9w-u7x2LHoN-uUVOQqj4SH+VfBWA9BCHBDpckgw@mail.gmail.com>
	<CAFj8pRDMMTXX1B56P=7cvJvDSOYuhrVE_PBch7EFOV8-qOHNzQ@mail.gmail.com>

Pavel Stehule <pavel.stehule@gmail.com> writes:
> pá 28. 1. 2022 v 21:19 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
> napsal:
>> Probably it is side effect of this patch
>> https://github.com/postgres/postgres/commit/9e38c2bb5093ceb0c04d6315ccd8975bd17add66#diff-e2a931f900...

> anycompatible* types are less sensitive to different data types, but it
> increases a risk of possibility of errors when more than one function can
> be detected for execution on analysis of function's signatures.

Hmm.  We have

regression=# \do ||
                                                   List of operators
   Schema   | Name |   Left arg type    |   Right arg type   |    Result type     |             Description             
------------+------+--------------------+--------------------+--------------------+-------------------------------------
 pg_catalog | ||   | anycompatible      | anycompatiblearray | anycompatiblearray | prepend element onto front of array
 pg_catalog | ||   | anycompatiblearray | anycompatible      | anycompatiblearray | append element onto end of array
 pg_catalog | ||   | anycompatiblearray | anycompatiblearray | anycompatiblearray | concatenate
 ...

where before it was

 pg_catalog | ||   | anyelement    | anyarray       | anyarray    | prepend element onto front of array
 pg_catalog | ||   | anyarray      | anyelement     | anyarray    | append element onto end of array
 pg_catalog | ||   | anyarray      | anyarray       | anyarray    | concatenate

which was non-ambiguous because in this usage, anyelement
wouldn't match an array type.  I wonder why that's not
happening with the anycompatible family?

We could s/anycompatible/anycompatiblenonarray/ in the
catalog entries, but it seems like we shouldn't have to.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <2807139.1643406198@sss.pgh.pa.us>
Permalink:  ../2807139.1643406198@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2807139.1643406198@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD)
  In-Reply-To: <2807139.1643406198@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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