Обсуждение: Update hstore % Doc

Поиск
Список
Период
Сортировка

Update hstore % Doc

От
"David E. Wheeler"
Дата:
Hackers,

I noticed that the hstore docs still document the => operator instead of %. This patch changes that. It also updates
thefirst examples to us full SQL statements, because otherwise the use of => without surrounding single quotes was
confusing.

Best,

David


Вложения

Re: Update hstore % Doc

От
Tom Lane
Дата:
"David E. Wheeler" <david.wheeler@pgexperts.com> writes:
> I noticed that the hstore docs still document the => operator instead
> of %. This patch changes that.

It looks to me like you are changing the examples of the I/O
representation ... which did NOT change.
        regards, tom lane


Re: Update hstore % Doc

От
"David E. Wheeler"
Дата:
On Aug 6, 2010, at 3:16 PM, Tom Lane wrote:

>> I noticed that the hstore docs still document the => operator instead
>> of %. This patch changes that.
>
> It looks to me like you are changing the examples of the I/O
> representation ... which did NOT change.

Hrm? The first few examples at the top? I find them confusing because there are no single quotes around them, so they
looklike the use of the deprecated => operator (especially the first two). Just look at:  
http://developer.postgresql.org/pgdocs/postgres/hstore.html

Maybe that's standard in the docs, but it seems weird to me. It's a minor point, though.

We definitely need to document the `text % text` constructor rather than the deprecated `text => text` constructor.

And I hate to say it, but % is awful. Sorry, I know I'm probably opening a can of worms here, and I did finally push %
afterall the arguments, but coming back to it fresh it just looks bizarre to me. Maybe that ship has sailed, though,
andI'm just being difficult. 

Best,

David



Re: Update hstore % Doc

От
Tom Lane
Дата:
"David E. Wheeler" <david.wheeler@pgexperts.com> writes:
> On Aug 6, 2010, at 3:16 PM, Tom Lane wrote:
>> It looks to me like you are changing the examples of the I/O
>> representation ... which did NOT change.

> Hrm? The first few examples at the top? I find them confusing because there are no single quotes around them, so they
looklike the use of the deprecated => operator (especially the first two). Just look at: 
 

Yeah, but there's a sentence in front of them that says specifically
that these are examples of the text representation, not pieces of SQL.

> And I hate to say it, but % is awful.

Yeah, I know, but you can't have =>.  Unless you can persuade the SQL
committee to back off their syntax choice for parameters.  (:= would
have been a lot better ...)
        regards, tom lane


Re: Update hstore % Doc

От
Tom Lane
Дата:
"David E. Wheeler" <david.wheeler@pgexperts.com> writes:
> We definitely need to document the `text % text` constructor

BTW, there isn't any % constructor anymore --- we agreed to provide
only the hstore(text, text) constructor.
        regards, tom lane


Re: Update hstore % Doc

От
"David E. Wheeler"
Дата:
On Aug 6, 2010, at 3:38 PM, Tom Lane wrote:

>> We definitely need to document the `text % text` constructor
> 
> BTW, there isn't any % constructor anymore --- we agreed to provide
> only the hstore(text, text) constructor.

Oh, I must've been looking at an older checkout, then. Never mind.

Best,

David


Re: Update hstore % Doc

От
Robert Haas
Дата:
On Fri, Aug 6, 2010 at 6:49 PM, David E. Wheeler
<david.wheeler@pgexperts.com> wrote:
> On Aug 6, 2010, at 3:38 PM, Tom Lane wrote:
>
>>> We definitely need to document the `text % text` constructor
>>
>> BTW, there isn't any % constructor anymore --- we agreed to provide
>> only the hstore(text, text) constructor.
>
> Oh, I must've been looking at an older checkout, then. Never mind.

And also - it was never the constructor.  It was briefly the slice operator.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company