Re: hstore isexists

Lists: pgsql-hackers
From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: hstore isexists
Date: 2006-10-11 13:09:45
Message-ID: 452CED19.3080509@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Before we spring hstore on an unsuspecting world as a contrib module, in
the interests of good English, is it too late to change "isexists" to
simply "exists"?

cheers

andrew


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 13:11:49
Message-ID: 200610111311.k9BDBnB01575@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
> Before we spring hstore on an unsuspecting world as a contrib module, in
> the interests of good English, is it too late to change "isexists" to
> simply "exists"?

Sure, we can do it, as long as we aren't worried about adding
incompatibilities for existing hstore users.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 13:43:11
Message-ID: 452CF4EF.5070504@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

It's possible to create function 'exists' and mention only it in docs.

Bruce Momjian wrote:
> Andrew Dunstan wrote:
>> Before we spring hstore on an unsuspecting world as a contrib module, in
>> the interests of good English, is it too late to change "isexists" to
>> simply "exists"?
>
> Sure, we can do it, as long as we aren't worried about adding
> incompatibilities for existing hstore users.
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 14:04:10
Message-ID: 452CF9DA.5020904@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Teodor Sigaev wrote:
> It's possible to create function 'exists' and mention only it in docs.

Good point. Will you do that, or do you want me to?

>
> Bruce Momjian wrote:
>> Andrew Dunstan wrote:
>>> Before we spring hstore on an unsuspecting world as a contrib
>>> module, in the interests of good English, is it too late to change
>>> "isexists" to simply "exists"?
>>
>> Sure, we can do it, as long as we aren't worried about adding
>> incompatibilities for existing hstore users.
>>
>


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 14:10:09
Message-ID: 452CFB41.2000403@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:
> Teodor Sigaev wrote:
>> It's possible to create function 'exists' and mention only it in docs.
>
> Good point. Will you do that, or do you want me to?

May I ask you? I'm afraid that there is more incorrectness.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 14:29:56
Message-ID: 452CFFE4.1010802@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Teodor Sigaev wrote:
>
>
> Andrew Dunstan wrote:
>> Teodor Sigaev wrote:
>>> It's possible to create function 'exists' and mention only it in docs.
>>
>> Good point. Will you do that, or do you want me to?
>
> May I ask you? I'm afraid that there is more incorrectness.
>
>

Well, "isdefined" isn't incorrect, but I think there's a good case to
change it to just "defined", since exists and defined are the names of
the corresponding perl tests on associative arrays. All the rest look ok
to me.

cheers

andrew


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 14:45:36
Message-ID: 452D0390.50606@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

'exists' isn't a good name for function :(. From gram.y:
col_name_keyword:
...

function_name:
IDENT { $$ = $1; }
| unreserved_keyword { $$ = pstrdup($1); }
| func_name_keyword { $$ = pstrdup($1); }
;

So call of function named 'exists' should be in quotas:
select "exists"('a=>1','a');

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 14:48:11
Message-ID: 22958.1160578091@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> 'exists' isn't a good name for function :(.

Yeah, that isn't going to work. Perhaps "ifexists"? Or just leave well
enough alone.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 15:22:18
Message-ID: 452D0C2A.3020807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
>
>> 'exists' isn't a good name for function :(.
>>
>
> Yeah, that isn't going to work. Perhaps "ifexists"? Or just leave well
> enough alone.
>
>
>

Darn. Can't have been thinking clearly this morning.

How about "exist" (no s)?

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 15:26:36
Message-ID: 23553.1160580396@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> How about "exist" (no s)?

Seems a bit ugly, but better than isexists or ifexists ...

regards, tom lane


From: "korryd(at)enterprisedb(dot)com" <korryd(at)enterprisedb(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 19:35:00
Message-ID: 1160595300.12993.42.camel@sakai.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> >> 'exists' isn't a good name for function :(.
> >>
> >
> > Yeah, that isn't going to work. Perhaps "ifexists"? Or just leave well
> > enough alone.
> >
> >
> >
>
> Darn. Can't have been thinking clearly this morning.
>
> How about "exist" (no s)?

Maybe 'found', 'present', or 'contains'? (no, I haven't checked for a
grammar conflict)

-- Korry


From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 20:10:44
Message-ID: 20061011201044.GP13487@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Oct 11, 2006 at 10:04:10AM -0400, Andrew Dunstan wrote:
> Teodor Sigaev wrote:
> >It's possible to create function 'exists' and mention only it in docs.
>
> Good point. Will you do that, or do you want me to?

ISTM it would be better to mention the deprecated version and
explicitly state that it's deprecated.

> >
> >Bruce Momjian wrote:
> >>Andrew Dunstan wrote:
> >>>Before we spring hstore on an unsuspecting world as a contrib
> >>>module, in the interests of good English, is it too late to change
> >>>"isexists" to simply "exists"?
> >>
> >>Sure, we can do it, as long as we aren't worried about adding
> >>incompatibilities for existing hstore users.
> >>
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 20:17:19
Message-ID: 452D514F.2030805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jim C. Nasby wrote:
> On Wed, Oct 11, 2006 at 10:04:10AM -0400, Andrew Dunstan wrote:
>
>> Teodor Sigaev wrote:
>>
>>> It's possible to create function 'exists' and mention only it in docs.
>>>
>> Good point. Will you do that, or do you want me to?
>>
>
> ISTM it would be better to mention the deprecated version and
> explicitly state that it's deprecated.
>
>

If we had had this in contrib previously with the deprecated call I
would agree. But it seems like bad practice and unnecessary clutter to
start off by deprecating something.

cheers

andrew


From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 20:57:20
Message-ID: 20061011205719.GS13487@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Oct 11, 2006 at 04:17:19PM -0400, Andrew Dunstan wrote:
> Jim C. Nasby wrote:
> >On Wed, Oct 11, 2006 at 10:04:10AM -0400, Andrew Dunstan wrote:
> >
> >>Teodor Sigaev wrote:
> >>
> >>>It's possible to create function 'exists' and mention only it in docs.
> >>>
> >>Good point. Will you do that, or do you want me to?
> >>
> >
> >ISTM it would be better to mention the deprecated version and
> >explicitly state that it's deprecated.
> >
> >
>
> If we had had this in contrib previously with the deprecated call I
> would agree. But it seems like bad practice and unnecessary clutter to
> start off by deprecating something.

Sorry, I don't know the history of hstore... but if it's brand new, why
are we worried about backwards compatibility?
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 21:00:50
Message-ID: 27834.1160600450@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Sorry, I don't know the history of hstore... but if it's brand new, why
> are we worried about backwards compatibility?

Because it's been available for awhile outside of contrib (namely,
on Oleg and Teodor's own site). So there are people using it.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 21:01:04
Message-ID: 452D5B90.5040606@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jim C. Nasby wrote:
> Sorry, I don't know the history of hstore... but if it's brand new, why
> are we worried about backwards compatibility?
>

It has existed for a while, but has not previously been in contrib.

cheers

andrew


From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 21:05:47
Message-ID: 20061011210547.GU13487@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Oct 11, 2006 at 05:00:50PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > Sorry, I don't know the history of hstore... but if it's brand new, why
> > are we worried about backwards compatibility?
>
> Because it's been available for awhile outside of contrib (namely,
> on Oleg and Teodor's own site). So there are people using it.

So wouldn't it make sense to document that the old functions are
depricated so those existing users will stop using them? Maybe the base
documentation isn't the best place for that... perhaps an UPGRADING
section.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstore isexists
Date: 2006-10-11 22:22:25
Message-ID: 200610112222.k9BMMPM00348@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Jim C. Nasby wrote:
> On Wed, Oct 11, 2006 at 05:00:50PM -0400, Tom Lane wrote:
> > "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > > Sorry, I don't know the history of hstore... but if it's brand new, why
> > > are we worried about backwards compatibility?
> >
> > Because it's been available for awhile outside of contrib (namely,
> > on Oleg and Teodor's own site). So there are people using it.
>
> So wouldn't it make sense to document that the old functions are
> depricated so those existing users will stop using them? Maybe the base
> documentation isn't the best place for that... perhaps an UPGRADING
> section.

The source code should mention it --- that's all.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +