Re: JSON Function Bike Shedding

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: JSON Function Bike Shedding
Date: 2013-02-19 19:55:10
Message-ID: CAFj8pRA-P=NpUJAVDV7VHUuaM=ZNBvbKBCXjE-SH05=o4usB4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/2/19 Josh Berkus <josh(at)agliodbs(dot)com>:
>
>>> I've come to value greppability of source code pretty highly. I think
>> that
>>> some of the points you raise are valid, but in my (minority) opinion
>>> overloading creates more problems than it solves. You're not going to
>>> convince me that get() is *ever* a good name for a function - you might as
>>> well call it thing() or foo() for all the useful information that name
>> conveys.
>
> What about extract()? That's consistent with the function we already
> use for timestamps and intervals, and is more clear than get().

"extract" is not usual function, it is supported by parser, and in
this time nobody knows datatypes, so result can be some ugly error
messages

Regards

Pavel

>
> On the other hand, to_string() seems like a GREAT name for an overloaded
> function. You know that it takes some other type as an argument,
> possibly several other types, and will always output a string.
>
> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.com
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2013-02-19 20:19:26 Re: posix_fadvise missing in the walsender
Previous Message Josh Berkus 2013-02-19 19:52:01 Re: JSON Function Bike Shedding