Re: [GENERAL] Empty arrays with ARRAY[] - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: [GENERAL] Empty arrays with ARRAY[]
Date
Msg-id 37ed240d0711271557j51f8233r9fb55518d11868ea@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Empty arrays with ARRAY[]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [GENERAL] Empty arrays with ARRAY[]
List pgsql-hackers
On Nov 28, 2007 9:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I had a bit of a dig into this.  A_Const->typename gets set directly
> > by the parse paths for "INTERVAL [(int)] string [interval range]".  In
> > fact, as far as I can tell that's the _only_ place A_Const->typename
> > gets used at all.
>
> Uh, you missed quite a lot of others ... see CURRENT_DATE and a lot of
> other productions.
>

Thanks again.  I missed those because they don't use
makeStringConst().  Looking again, it turns out "many productions" is
more like 15.

That's a bigger number, certainly, but it's still manageable.  It
wouldn't be hard to convert them to generate a const-in-a-cast.  In
fact with the addition of a makeCastStringConst(), I think the code
saving from A_Const->typename would be cancelled out.

If the only reason for keeping A_Const->typename around is the alleged
code saving (as indicated by the code comments), my offer to do away
with it is still on the table.

Regards,
BJ


pgsql-hackers by date:

Previous
From: "Guillaume Smet"
Date:
Subject: Re: Quality and Performance
Next
From: Josh Berkus
Date:
Subject: Re: Quality and Performance