Unix Technical Forum

hstore isexists

This is a discussion on hstore isexists within the pgsql Hackers forums, part of the PostgreSQL category; --> Before we spring hstore on an unsuspecting world as a contrib module, in the interests of good English, is ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 06:14 AM
Andrew Dunstan
 
Posts: n/a
Default hstore isexists


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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 06:14 AM
Bruce Momjian
 
Posts: n/a
Default Re: hstore isexists

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@momjian.us
EnterpriseDB http://www.enterprisedb.com

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 06:14 AM
Teodor Sigaev
 
Posts: n/a
Default Re: hstore isexists

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@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 06:14 AM
Andrew Dunstan
 
Posts: n/a
Default Re: hstore isexists

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.
>>

>


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 06:14 AM
Teodor Sigaev
 
Posts: n/a
Default Re: hstore isexists



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@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-12-2008, 06:14 AM
Andrew Dunstan
 
Posts: n/a
Default Re: hstore isexists

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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-12-2008, 06:14 AM
Teodor Sigaev
 
Posts: n/a
Default Re: hstore isexists

'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@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-12-2008, 06:14 AM
Tom Lane
 
Posts: n/a
Default Re: hstore isexists

Teodor Sigaev <teodor@sigaev.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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-12-2008, 06:15 AM
Andrew Dunstan
 
Posts: n/a
Default Re: hstore isexists

Tom Lane wrote:
> Teodor Sigaev <teodor@sigaev.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




---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-12-2008, 06:15 AM
Tom Lane
 
Posts: n/a
Default Re: hstore isexists

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


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

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com