Re: Re: proposal: ignore null fields in not relation type composite type based constructors
От | Pavel Stehule |
---|---|
Тема | Re: Re: proposal: ignore null fields in not relation type composite type based constructors |
Дата | |
Msg-id | CAFj8pRD6kVU17yf4yboEheOoLu5U6188M7iMTRgq70nfZYpfCQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Re: proposal: ignore null fields in not relation type composite type based constructors (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: Re: proposal: ignore null fields in not relation type
composite type based constructors
|
Список | pgsql-hackers |
2014-09-03 7:05 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:
Hello2014-09-02 13:54 GMT+02:00 Jeevan Chalke <jeevan.chalke@enterprisedb.com>:Hi Pavel,it needs a redesign of original implementation, we should to change API to use default values with named parametersbut it doesn't help too much (although it can be readable little bit more)instead row_to_json(x, false, true)berow_ro_json(x, ignore_null := true)it is not too much work, but I need a names for parametersI have tried adding dummy names (a, b, c) in pg_proc entry you have added.
But that is not sufficient. We need to have default values provided to these
arguments to work row_ro_json(x, ignore_null := true) call.
It was not trivial. So I have not put much thought on that.For name, I choose (row, pretty, ignore_nulls) or similar.
I cannot use "row" because it is keyword - I used "rowval"
Regards
Pavel
Pavel
However it was my thought.
If it is too complex of not so useful then we can ignore it.here is patchRegards
PavelThanks--Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: