From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: Re: proposal: ignore null fields in not relation type composite type based constructors |
Date: | 2014-09-03 05:05:50 |
Message-ID: | CAFj8pRBXWpuJ4APAKcDUAqJNWjUqq1rXZAcxUzRTzgrymkaOGw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
2014-09-02 13:54 GMT+02:00 Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>:
> Hi Pavel,
>
> it needs a redesign of original implementation, we should to change API
>> to use default values with named parameters
>>
>> but it doesn't help too much (although it can be readable little bit more)
>>
>> instead row_to_json(x, false, true)
>>
>> be
>>
>> row_ro_json(x, ignore_null := true)
>>
>> it is not too much work, but I need a names for parameters
>>
>
> I 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.
>
> However it was my thought.
> If it is too complex of not so useful then we can ignore it.
>
here is patch
Regards
Pavel
>
> Thanks
> --
> Jeevan B Chalke
> Principal Software Engineer, Product Development
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company
>
>
Attachment | Content-Type | Size |
---|---|---|
row_to_json_ignorenull-2.patch | text/x-patch | 8.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2014-09-03 05:06:34 | Re: Re: proposal: ignore null fields in not relation type composite type based constructors |
Previous Message | Noah Misch | 2014-09-03 04:35:42 | Re: Patch for psql History Display on MacOSX |