2014-04-02 17:19 GMT+02:00 Tom Lane :
> Pavel Stehule writes:
> > I was informed about impossibility to use a polymorphic functions
> together
> > with domain types
>
> > see
>
> > create domain xx as numeric(15);
>
> > create or replace function g(anyelement, anyelement)
> > returns anyelement
2014-04-02 18:34 GMT+02:00 David Johnston :
> 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 s
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 serve
On 2014-04-02 12:27:30 -0400, Tom Lane wrote:
> David Johnston 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,
2014-04-02 18:27 GMT+02:00 Tom Lane :
> David Johnston 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
David Johnston 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
Tom Lane-2 wrote
> Pavel Stehule <
> pavel.stehule@
> > writes:
>> I was informed about impossibility to use a polymorphic functions
>> together
>> with domain types
>
>> see
>
>> create domain xx as numeric(15);
>
>> create or replace function g(anyelement, anyelement)
>> returns anyelement
2014-04-02 17:19 GMT+02:00 Tom Lane :
> Pavel Stehule writes:
> > I was informed about impossibility to use a polymorphic functions
> together
> > with domain types
>
> > see
>
> > create domain xx as numeric(15);
>
> > create or replace function g(anyelement, anyelement)
> > returns anyelement
Pavel Stehule writes:
> I was informed about impossibility to use a polymorphic functions together
> with domain types
> see
> create domain xx as numeric(15);
> create or replace function g(anyelement, anyelement)
> returns anyelement as
> $$ select $1 + $2 $$
> language sql immutable;
> po