| From: | Joe Conway <mail(at)joeconway(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: array support patch phase 1 patch |
| Date: | 2003-06-01 00:14:47 |
| Message-ID: | 3ED94577.5010801@joeconway.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Tom Lane wrote:
> Another problem is:
>
> regression=# select distinct array(select * from text_tbl) from foo;
> ERROR: Unable to identify an equality operator for type text[]
>
> This DISTINCT query would fail anyway of course, for lack of a '<'
> operator for arrays, but it seems like we ought to be able to find the
> polymorphic '=' operator.
The attached small patch addresses the above concern (finding
polymorphic "=" operator) by introducing a new function,
IsPolymorphicCoercible().
Now, as predicted, I get:
regression=# select distinct array(select f1 from tse);
ERROR: Unable to identify an ordering operator for type integer[]
Use an explicit ordering operator or modify the query
If there are no objections, please apply.
Next question this begs is, should I work on a '<' operator for arrays?
And if so, how is the behavior defined? Hannu suggested
element-by-element, analogous to character-by-character text string
comparison. Comments?
Thanks,
Joe
| Attachment | Content-Type | Size |
|---|---|---|
| array-polycoerce.1.patch | text/plain | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sean Chittenden | 2003-06-01 01:43:23 | Re: [HACKERS] Are we losing momentum? |
| Previous Message | Joe Conway | 2003-05-31 21:40:15 | array support phase 3 patch (was Re: array support patch phase 1 patch) |