Multiple anyelement types - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Multiple anyelement types
Date
Msg-id 20080811181203.9A32.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: Multiple anyelement types  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
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.

What syntax is suitable for postgres? Comments welcome.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Question regarding the database page layout.
Next
From: Zdenek Kotala
Date:
Subject: Re: Proposal: PageLayout footprint