Re: [HACKERS] _text problem in union

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] _text problem in union
Date: 1999-09-27 15:42:33
Message-ID: 199909271542.LAA16213@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Hi,
>
> I have small problem with text array in union query.. see:
>
>
> abil=> select 5 union select 5;
> ?column?
> --------
> 5
> (1 row)
>
> abil=> select 5 union select 6;
> ?column?
> --------
> 5
> 6
> (2 rows)
>
> abil=> select '{"aaa"}'::_text union select '{"aaa"}'::_text;
> ?column?
> --------
> {"aaa"}
> (1 row)
>
> abil=> select '{"aaa"}'::_text union select '{"bbb"}'::_text;
> ERROR: Unable to identify an ordering operator '<' for type '_text'
> Use an explicit ordering operator or modify the query
> abil=>

Good problem description. Seems we can't compare arrays of text fields.

Seems if we have an array of text fields, we could compare each element
one-by-one using the base type until we get a comparison result.

Not sure if this should make the TODO list or not.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-09-27 15:49:12 Re: [HACKERS] double opens
Previous Message Bruce Momjian 1999-09-27 15:38:05 Re: [PATCHES] RE: [HACKERS] Index access using multi-column indices