WIP: named and mixed notation support
От | Pavel Stehule |
---|---|
Тема | WIP: named and mixed notation support |
Дата | |
Msg-id | 162867790903011349l70ce76eexcc81076754d6285@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: WIP: named and mixed notation support
|
Список | pgsql-hackers |
Hello Attachment contains patch for support mixed and named notation with special (PostgreSQL) syntax as was talked before. postgres=# create function dfunc(a int, b int = 1, c int) returns table (a int, b int, c int) as $$ select $1, $2, $3; $$ language sql; CREATE FUNCTION postgres=# select * from dfunc(10,20,30); a | b | c ----+----+---- 10 | 20 | 30 (1 row) postgres=# select * from dfunc(10 as a, 30 as c); a | b | c ----+---+---- 10 | 1 | 30 (1 row) postgres=# select * from dfunc(30 as c, 10 as a); a | b | c ----+---+---- 10 | 1 | 30 (1 row) postgres=# select * from dfunc(10, 30 as c); a | b | c ----+---+---- 10 | 1 | 30 (1 row) postgres=# this patch is bigger, because I had to add column to pg_proc - colum contains map of defaults arguments: postgres=# select * from pg_proc where proname='dfunc'; -[ RECORD 1 ]----+------------------------------------------------------------------------------------------------------------------------------------- proname | dfunc pronamespace | 2200 proowner | 16384 prolang | 14 procost | 100 prorows | 1000 provariadic | 0 proisagg | f proiswindow | f prosecdef | f proisstrict | f proretset | t provolatile | v pronargs | 3 pronpargdefaults | 0 prorettype | 2249 proargtypes | 23 23 23 proallargtypes | {23,23,23,23,23,23} proargmodes | {i,i,i,t,t,t} proargnames | {a,b,c,a,b,c} proargdefaults | (<> {CONST :consttype 23 :consttypmod -1 :constlen 4 :constbyval true :constisnull false :location 37 :constvalue 4 [ 1 0 0 0 ]} <>) proargdefmap | {n,d,n} prosrc | : select $1, $2, $3; : probin | proconfig | proacl | regards Pavel Stehule
Вложения
В списке pgsql-hackers по дате отправления: