Re: polymorphic SQL functions has a problem with domains

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: polymorphic SQL functions has a problem with domains
Date: 2014-04-02 16:27:30
Message-ID: 16561.1396456050@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Johnston <polobo(at)yahoo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-04-02 16:30:30 Re: polymorphic SQL functions has a problem with domains
Previous Message David Johnston 2014-04-02 15:47:53 Re: polymorphic SQL functions has a problem with domains