Re: WIP: hooking parser - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: WIP: hooking parser
Date
Msg-id 162867790902160535i328494a0ia2f95fa4bb3eabc@mail.gmail.com
Whole thread Raw
In response to Re: WIP: hooking parser  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: WIP: hooking parser
Re: WIP: hooking parser
List pgsql-hackers
Next sample of parser hook using:

attachment contains module that transform every empty string to null.
I am not sure, if this behave is exactly compatible with Oracle, but
for first iteration it is good.

postgres=# select length('') is null;
 ?column?
----------
 t
(1 row)

I thing, so this should be used for emulation of some constructors too.

Regards
Pavel Stehule


2009/2/13 Peter Eisentraut <peter_e@gmx.net>:
> Heikki Linnakangas wrote:
>>
>> And on top of that, decode() is supposed to do short-circuit evaluation of
>> the arguments.
>
> Then the only solution is to hack it right into the parser.
>
> There is an existing decode() function however ...
>

Attachment

pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: SE-PostgreSQL and row level security
Next
From: "Kevin Grittner"
Date:
Subject: Re: SE-PostgreSQL and row level security