Re: updates for handling optional argument in system functions - Mailing list pgsql-hackers

From Tristan Partin
Subject Re: updates for handling optional argument in system functions
Date
Msg-id DJ1F5L6XMENK.ABIOKCQQQ0FZ@partin.io
Whole thread
In response to Re: updates for handling optional argument in system functions  (Mark Wong <markwkm@gmail.com>)
Responses Re: updates for handling optional argument in system functions
List pgsql-hackers
> 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.

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.

--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)



pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: dict_synonym.c: fix truncation of multibyte sequence
Next
From: "Okanovic, Haris"
Date:
Subject: Replace spin-wait with futex-mutex in LWLockWaitListLock() on Linux aarch64