Re: [BUGS] Server crash while trying to read expression using pg_get_expr() - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: [BUGS] Server crash while trying to read expression using pg_get_expr()
Date
Msg-id 0DA83484-7662-4146-9AB3-5571E6732E07@phlo.org
Whole thread Raw
In response to Re: [BUGS] Server crash while trying to read expression using pg_get_expr()  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: [BUGS] Server crash while trying to read expression using pg_get_expr()  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Jun 15, 2010, at 9:31 , Heikki Linnakangas wrote:
> You could avoid changing the meaning of fn_expr by putting the check in the parse analysis phase, into
transformFuncCall().That would feel safer at least for back-branches. 

For 9.0, wouldn't a cleaner way to accomplish this be a seperate type for expressions, say pg_expr, instead of storing
themas text? With an input function that unconditionally raises and error and no cast to pg_expr, creating new
instancesof that type would be impossible for normal users. The output function and casts to text would call
pg_get_expr()with zero as the second argument. 

The internal representation wouldn't change, it's just the type's OID in the catalog that'd be different.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Proposal for 9.1: WAL streaming from WAL buffers
Next
From: Stephen Frost
Date:
Subject: Re: [v9.1] Add security hook on initialization of instance