Skip site navigation (1) Skip section navigation (2)

Re: array support patch phase 1 patch

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: (view raw, whole thread or download thread mbox)
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, 

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?



Attachment: array-polycoerce.1.patch
Description: text/plain (2.8 KB)

In response to


pgsql-patches by date

Next:From: Sean ChittendenDate: 2003-06-01 01:43:23
Subject: Re: [HACKERS] Are we losing momentum?
Previous:From: Joe ConwayDate: 2003-05-31 21:40:15
Subject: array support phase 3 patch (was Re: array support patch phase 1 patch)

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group