Re: polymorphic SQL functions has a problem with domains - Mailing list pgsql-hackers

From Tom Lane
Subject Re: polymorphic SQL functions has a problem with domains
Date
Msg-id 16561.1396456050@sss.pgh.pa.us
Whole thread Raw
In response to Re: polymorphic SQL functions has a problem with domains  (David Johnston <polobo@yahoo.com>)
Responses Re: polymorphic SQL functions has a problem with domains  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: polymorphic SQL functions has a problem with domains  (Andres Freund <andres@2ndquadrant.com>)
Re: polymorphic SQL functions has a problem with domains  (David Johnston <polobo@yahoo.com>)
List pgsql-hackers
David Johnston <polobo@yahoo.com> writes:
> Does something like:
> SELECT ($1 + $2)::$1%TYPE 
> exist where you can explicitly cast to the type of the input argument?

I don't think SQL-language functions have such a notation, but it's
possible in plpgsql, if memory serves.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: polymorphic SQL functions has a problem with domains
Next
From: Pavel Stehule
Date:
Subject: Re: polymorphic SQL functions has a problem with domains