Hello

>
> ANY [TYPE] and SAME AS [TYPE OF] are syntactic sugar indeed, but they
> are much more SQL-like than needing to write "any" or anyelement(n) as
> argument type or return type
>

I looked on possibilities in gram.y and I thing, type identifiers

"ANY TYPE" is possible without any problems (this should be synonym for "any"),
"SAME AS" needs add "same" keyword to col_name_keywords , i.e. "same"
is prohibited for function names - it should be a problem

regards
Pavel Stehule

I found so pgparser provide some ref type syntax via % symbol. So we
can use following syntax:

CREATE OR REPLACE FUNCTION foo(a ANY TYPE, b a%TYPE)
RETURNS a%TYPE ...

It is not pretty like SAME AS, but I am sure, so this is doable
(parser knows it now)

any other ideas?

regards
Pavel Stehule

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to