Re: [COMMITTERS] pgsql: Remove typename from A_Const.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [COMMITTERS] pgsql: Remove typename from A_Const.
Date: 2008-04-29 18:12:23
Message-ID: 3942.1209492743@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

alvherre(at)postgresql(dot)org (Alvaro Herrera) writes:
> Remove typename from A_Const.

I'm thinking this could be cleaned up further. The patch as applied
removes the ::int4 typename decoration that had been inserted by
makeIntConst(), while leaving in place the ::float8 decoration inserted
by makeFloatConst(). The kindest thing that can be said about that
is that it's inconsistent. Now as far as I can see in a look through
gram.y, these routines (and makeAConst) were used only in places where
the typename qualification was really unnecessary, that is typmods
and GUC variable values and so on, not general expression contexts where
we might really need to determine a data type for the constant. So what
I'm thinking is that we should get rid of the ::float8 decoration too,
and thereby be able to revert some of the ugly code added elsewhere such
as guc.c.

Is there a reason it was done this way that I'm missing?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-29 19:37:04 pgsql: Fix REASSIGN OWNED so that it works on procedural languages too.
Previous Message Alvaro Herrera 2008-04-29 14:59:17 pgsql: Remove typename from A_Const.

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-04-29 18:19:51 Re: Protection from SQL injection
Previous Message Alex Hunsaker 2008-04-29 17:48:14 Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]