hstore isexists
hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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
Re: hstore isexists
От:
Bruce Momjian <bruce@momjian.us>
Дата:
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. +
Re: hstore isexists
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
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/
Re: hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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. >> >
Re: hstore isexists
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
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/
Re: hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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
Re: hstore isexists
От:
Teodor Sigaev <teodor@sigaev.ru>
Дата:
'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/
Re: hstore isexists
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Teodor Sigaev 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
Re: hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Tom Lane wrote: > Teodor Sigaev 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
Re: hstore isexists
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andrew Dunstan writes: > How about "exist" (no s)? Seems a bit ugly, but better than isexists or ifexists ... regards, tom lane
Re: hstore isexists
От:
"korryd@enterprisedb.com" <korryd@enterprisedb.com>
Дата:
>> '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
Re: hstore isexists
От:
"Jim C. Nasby" <jim@nasby.net>
Дата:
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@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Re: hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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
Re: hstore isexists
От:
"Jim C. Nasby" <jim@nasby.net>
Дата:
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@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Re: hstore isexists
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Jim C. Nasby" 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
Re: hstore isexists
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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
Re: hstore isexists
От:
"Jim C. Nasby" <jim@nasby.net>
Дата:
On Wed, Oct 11, 2006 at 05:00:50PM -0400, Tom Lane wrote: > "Jim C. Nasby" 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@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Re: hstore isexists
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Jim C. Nasby wrote: > On Wed, Oct 11, 2006 at 05:00:50PM -0400, Tom Lane wrote: > > "Jim C. Nasby" 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@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +