Search Postgresql Archives

Custom types as parameter in stored function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello to everyone,
I am trying to pass custom types as parameters in stored functions, and I
tried this syntax successfully:

create type myType as (id bigint, name character varying);


create or replace myfunc(obj myType)
returns void as
begin
.......
end;


select myfunc((1, 'foo')::myType;


In this manner, if I understand it, there is a positional assignment of
attribute value: id = 1 and name = foo.
My ask is is there a manner to assing value to attribute of custom type by
name instead by position.

Thanks in advance.

Mephysto.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Custom-types-as-parameter-in-stored-function-tp4527618p4527618.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux