Re: Multiple anyelement types

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multiple anyelement types
Date: 2008-08-11 11:12:04
Message-ID: 162867790808110412t277c090bj61a130341dbba884@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

He

2008/8/11 ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>:
> I'm working on improvements of orafce.
> http://pgfoundry.org/projects/orafce
>
> I found postgres supports only one type of anyelement at one time
> when I added nvl2() and decode(). I'd like to use multiple types of
> anyelement something like:
>
> template < typename Expr, typename Ret >
> CREATE FUNCTION nvl(Expr, Ret, Ret) RETURNS Ret
>
> template < typename Expr, typename Ret >
> CREATE FUNCTION decode(Expr, Expr, Ret, ..., Ret) RETURNS Ret
>
> I don't mean to propose the above C++-like syntax, but such feature
> is important to develop a generic porting tool. Two independent
> anyelements are enough for me, but three or more might be better
> for general use.
>

it's good idea - I though so 2 independent types are enough:
anyelement2, enyarray2. If you are C coder, you should use "any" type.

regards
Pavel Stehule

> What syntax is suitable for postgres? Comments welcome.
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-08-11 11:39:13 Re: Proposal: PageLayout footprint
Previous Message Zdenek Kotala 2008-08-11 10:58:08 Re: Proposal: PageLayout footprint