Re: updates for handling optional argument in system functions

Поиск
Список
Период
Сортировка
Искать
От
Mark Wong
Тема
Re: updates for handling optional argument in system functions
Дата
в 17:47:37
Msg-id
airKicKeRJaaoMF5@ltdrgnflg2
Ответ на
Список
Дерево обсуждения
updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Daniel Gustafsson <daniel@yesql.se>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Andreas Karlsson <andreas@proxel.se>
Re: updates for handling optional argument in system functions Andreas Karlsson <andreas@proxel.se>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Chao Li <li.evan.chao@gmail.com>
Re: updates for handling optional argument in system functions "David G. Johnston" <david.g.johnston@gmail.com>
Re: updates for handling optional argument in system functions Chao Li <li.evan.chao@gmail.com>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Andreas Karlsson <andreas@proxel.se>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Andreas Karlsson <andreas@proxel.se>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions "Tristan Partin" <tristan@partin.io>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions "Tristan Partin" <tristan@partin.io>
Re: updates for handling optional argument in system functions Fujii Masao <masao.fujii@gmail.com>
Re: updates for handling optional argument in system functions Tom Lane <tgl@sss.pgh.pa.us>
Re: updates for handling optional argument in system functions Fujii Masao <masao.fujii@gmail.com>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Chao Li <li.evan.chao@gmail.com>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Álvaro Herrera <alvherre@kurilemu.de>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
Re: updates for handling optional argument in system functions Andreas Karlsson <andreas@proxel.se>
Re: updates for handling optional argument in system functions Mark Wong <markwkm@gmail.com>
On Fri, Jun 05, 2026 at 09:04:34PM +0000, Tristan Partin wrote:
> > Patch 1
> >
> > -  proargtypes => 'oid bool', prosrc => 'pg_get_ruledef_ext' },
> > +  proargtypes => 'oid bool', proargnames => '{rule,pretty}',
> > +  proargdefaults => '{false}',prosrc => 'pg_get_ruledef' },
> 
> There is a space missing before prosrc in the added line.
> 
> Other than that one comment, this looks good to me.

Oops, v8.1 attached to correct that white space.

> I am a little confused how proargdefaults works given the function takes 
> two arguments, but you only defined one default, so how does the parser 
> know that the false default is in reference to "pretty". I do see there 
> is other precedent for this pattern, so it is correct.

I believe that's handled in InsertOneProargdefaultsValue() in
src/backend/bootstrap/bootstrap.c, right below the comment:

   /* The values should correspond to the last N argtypes */

Regards,
Mark
В списке pgsql-hackers по дате отправления
От: Fujii Masao
Дата:
От: m.litsarev@postgrespro.ru
Дата:
FAQ