Re: [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
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Date: 2007-11-27 23:57:14
Message-ID: 37ed240d0711271557j51f8233r9fb55518d11868ea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers Postg토토 꽁 머니SQL

On Nov 28, 2007 9:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2007-11-28 00:01:06 Re: Linux v.s. Mac OS-X Performance
Previous Message Martin Gainty 2007-11-27 23:27:24 Re: spatial composition operators for PG

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-11-28 00:02:36 Re: Quality and Performance
Previous Message Guillaume Smet 2007-11-27 23:56:14 Re: Quality and Performance

Browse pgsql-patches by date

  From Date Subject
postgresql : Gevik Babakhani 2007-11-28 12:26:56 postgresql : v1.1 Todo 항목에 메이저 토토 사이트 패치 : 이름 별 SQL-Language Reference
Previous Message Tom Lane 2007-11-27 22:49:33 Re: [GENERAL] Empty arrays with ARRAY[]