Skip site navigation (1) Skip section navigation (2)

Re: parse_expr.c:typecast_expression:return immediate on NULL input

From: "Hannes Eder" <Hannes(at)HannesEder(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: parse_expr.c:typecast_expression:return immediate on NULL input
Date: 2007-11-23 17:41:44
Message-ID: 005101c82df8$1de22b80$59a68280$@net (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Hannes Eder <Hannes(at)HannesEder(dot)net> writes:
> > in parse_expr.c:typecast_expression: return immediate on NULL
> input, i.e. do not lookup target type Oid as it is not required.
> 
> I think the existing ordering is intentional, to detect and error
> out if the given typename is bogus.

Ups, yes, you are right. typecast_expression calls typenameTypeId and
this calls typenameType, which will ereport an error if the typename
cannot be found.

-Hannes


In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-23 17:44:48
Subject: Re: Cleaner API for appendStringInfoVA
Previous:From: Marko KreenDate: 2007-11-23 17:36:17
Subject: Re: Cleaner API for appendStringInfoVA

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group