Re: [PATCHES] [GENERAL] Empty arrays with ARRAY[]

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] [GENERAL] Empty arrays with ARRAY[]
Date: 2008-03-21 03:02:39
Message-ID: 37ed240d0803202002w40576f0ayfd6ccc4def899ca7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

On 21/03/2008, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Brendan Jurd" <direvus(at)gmail(dot)com> writes:
>
> > As discussed on -hackers, this patch allows the construction of an
> > empty array if an explicit cast to an array type is given (as in,
> > ARRAY[]::int[]).
>
>
> Applied with minor fixes; mostly, ensuring that the cast action would
> propagate down to sub-arrays, as in

Great, thanks Tom.

> I was interested to realize that this fix validates the decision to
> pass down the type information on-the-fly during transformExpr recursion.
> It would have been a lot more painful to do it if we'd taken the A_Const
> approach.
>

Indeed.

> I didn't do anything about removing A_Const's typename field, but I'm
> thinking that would be a good cleanup patch.
>

I'd be happy to take this on. My day job is pretty busy at the moment
but I should be able to submit something in a week or so.

Cheers,
BJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin 2008-03-21 05:43:53 cursor manipulation
Previous Message Tri Quach 2008-03-21 02:43:28 Re: createuser: could not connect to database postgres: FATAL: could not open file "global/pg_database": No such file or directory

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2008-03-21 03:45:50 Re: [PATCHES] Show INHERIT in \du
Previous Message Tom Lane 2008-03-21 01:48:38 Re: timestamp datatype cleanup

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-03-21 03:11:39 Re: Fix pgstatindex using for large indexes
Previous Message Tom Lane 2008-03-21 02:45:36 Re: Fix pgstatindex using for large indexes