Re: makeAndExpr(), etc. confined to gram.y?

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: makeAndExpr(), etc. confined to gram.y?
Date: 2014-06-25 08:25:58
Message-ID: CA+HiwqHn9OHCksuOq6AC5iKGsXpQSLvjMMxuOUFmmGCRhkhHOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 25, 2014 at 1:27 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Amit Langote <amitlangote09(at)gmail(dot)com> writes:
>> Is there a reason why they've been left out of
>> makefuncs.h/makefuncs.c? Perhaps they are not supposed to be used
>> outside gram.y at all? For example, previously a caller (potentially)
>> outside parser could do a makeA_Expr(AEXPR_AND, ...). I guess this is
>> no longer possible with AEXPR_AND gone?
>
> What would be the purpose? There is noplace except gram.y that builds
> raw parse trees.
>

Yeah, that is true. Sorry, I am unaware as to how generic make*
functions in gram.y are and how they differ from those in makefuncs.c.

So, use of make* family of functions outside parser is their abuse in
some way? Anything that needs to use these functions should somehow be
accomplished in parser perhaps. For example, duplicate/redundant CHECK
expressions elimination and such?

--
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anders Magnusson 2014-06-25 09:00:35 Re: PostgreSQL for VAX on NetBSD/OpenBSD
Previous Message Fujii Masao 2014-06-25 07:13:19 Re: Cluster name in ps output