Re: polymorphic SQL functions has a problem with domains
| От | David Johnston |
|---|---|
| Тема | Re: polymorphic SQL functions has a problem with domains |
| Дата | |
| Msg-id | 1396456455719-5798367.post@n5.nabble.com обсуждение исходный текст |
| Ответ на | Re: polymorphic SQL functions has a problem with domains (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: polymorphic SQL functions has a problem with domains
|
| Список | pgsql-hackers |
Tom Lane-2 wrote > David Johnston < > polobo@ > > 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. Indeed. http://www.postgresql.org/docs/9.3/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-TYPE Section 40.3.3 You lose inlining but at least it (should) work. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/polymorphic-SQL-functions-has-a-problem-with-domains-tp5798349p5798367.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
В списке pgsql-hackers по дате отправления: