| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: proposal: new polymorphic types - commontype and commontypearray |
| Date: | 2020-03-15 16:48:09 |
| Message-ID: | 18363.1584290889@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
>> Yeah, that's what I said. But does it really add anything beyond the
>> proposed text "A function returning a polymorphic type must have at least
>> one matching polymorphic argument"? I don't think it'd be terribly
>> helpful to say "A function returning anyelement must have at least one
>> anyelement, anyarray, anynonarray, anyenum, or anyrange argument", and
>> for sure such an error message would be a pain to maintain.
> The error message in your first patch is ok for all types without anyrange.
> A behave of this type is more strict and +/- different than from other
> polymorphic types.
Well, here's a version that does it like that, but personally I find these
messages too verbose and not an improvement on what I had before.
(This is also rebased over the stuff I committed yesterday.)
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-refactoring-2.patch | text/x-diff | 24.3 KB |
| 0002-add-anycompatible-2.patch | text/x-diff | 60.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andy Fan | 2020-03-15 17:01:11 | Re: [PATCH] Erase the distinctClause if the result is unique by definition |
| Previous Message | Dilip Kumar | 2020-03-15 15:54:31 | Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager |