Re: Questions about parsing boolean and casting to anyelement - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Questions about parsing boolean and casting to anyelement
Date
Msg-id 20090217092434.F173.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Questions about parsing boolean and casting to anyelement  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Questions about parsing boolean and casting to anyelement
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> >   - Are there any limitations in casting to anyelement?
> 
> It's a no-op ... probably we shouldn't even let you do it, if the
> lack of an error leaves room for such misinterpretation as this.
> anyelement and friends are placeholders for use in function
> declarations, not real types that it makes sense to cast to.

I hope anyelement could be used in cast because casts are supported by
almost programming languages where template or generics are available.
Moreover, we can cast to anyelement if we use C functions; using oid of
anyelement in runtime and querying an associated cast function from
system catalog.

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




pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: fillfactor for toast tables is useless?
Next
From: Tom Lane
Date:
Subject: Re: Questions about parsing boolean and casting to anyelement