| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> | 
| Subject: | Re: WIP: hooking parser | 
| Date: | 2009-02-12 14:24:44 | 
| Message-ID: | 200902121624.45301.peter_e@gmx.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Wednesday 11 February 2009 12:05:03 Pavel Stehule wrote:
> It works. And I thing, this should to solve lot of special task
> related to increase compatibility with Oracle, Informix, or it could
> be usefull for some others (json support).
>
> postgres=# load 'decode';
> LOAD
> postgres=# select
> decode(null::integer,2,'ahoj',3,'Petr',1,'Pavel',null, 'jaja');
>  decode
> --------
>  jaja
> (1 row)
I think what you want here is some way to define a function that takes an 
arbitrary number of arguments of arbitrary type and let the function figure 
everything out.  I see no reason why this can't be a variant on CREATE 
FUNCTION, except that of course you need to figure out some API and function 
resolution details.  But it doesn't have to be a completely different concept 
like a binary plugin.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | KaiGai Kohei | 2009-02-12 14:31:56 | Re: SE-PostgreSQL and row level security | 
| Previous Message | Peter Eisentraut | 2009-02-12 14:16:05 | Which installation parts are backward compatible? |