Re: Missing array support

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Missing array support
Date: 2003-07-20 02:48:56
Message-ID: 200307200248.h6K2mu305982@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Joe, do you need a TODO added for this?

---------------------------------------------------------------------------

Joe Conway wrote:
> Tom Lane wrote:
> > Joe Conway <mail(at)joeconway(dot)com> writes:
> >
> >>So array[] should produce '{}' of (an array) type determined by the
> >>context? OK -- seems easy enough.
> >
> > Is it? I think we'd decided that this could only reasonably be handled
> > by creating a datatype representing array-of-UNKNOWN. I'm afraid to do
> > that because I think it might allow the parser's type resolution
> > algorithms to follow paths we will not like. Perhaps it can be made to
> > work, but I think it will require some careful study.
>
> I took a closer look -- yeah, without array-of-UNKNOWN I don't think we
> can make this work.
>
> I got something working by forcing the element type to UNKNOWN when the
> elements list is empty in transformExpr(), but then select_common_type()
> turns around and turns UNKNOWN into TEXT, so you wind up with an empty
> text[].
>
> I won't bother sending that patch in because I *know* it will get
> rejected ;-)
>
> I guess we should put array-of-UNKNOWN on the list of things to look at
> for 7.5.
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-07-20 02:52:23 Re: Missing array support
Previous Message Bruce Momjian 2003-07-20 02:40:52 Re: Datetime patch

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2003-07-20 02:52:23 Re: Missing array support
Previous Message Bruce Momjian 2003-07-20 02:40:52 Re: Datetime patch