Rename function 'isexists' and 'isdefined' to
'exist' and 'defined' accordingly. Old names are saved not mentioned in docs - for compatibility with old applications. Per discussion http://archives.postgresql.org/pgsql-hackers/2006-10/msg00571.php
This commit is contained in:
parent
4e46f4799e
commit
3f16647960
|
@ -117,20 +117,20 @@ regression=# select * from each('a=>1,b=>2');
|
||||||
a | 1
|
a | 1
|
||||||
b | 2
|
b | 2
|
||||||
|
|
||||||
* isexists (hstore,text) - returns 'true if key is exists in hstore and
|
* exist (hstore,text) - returns 'true if key is exists in hstore and
|
||||||
false otherwise.
|
false otherwise.
|
||||||
|
|
||||||
regression=# select isexists('a=>1','a');
|
regression=# select exist('a=>1','a');
|
||||||
isexists
|
exist
|
||||||
----------
|
----------
|
||||||
t
|
t
|
||||||
|
|
||||||
* isdefined (hstore,text) - returns true if key is exists in hstore and
|
* defined (hstore,text) - returns true if key is exists in hstore and
|
||||||
its value is not NULL.
|
its value is not NULL.
|
||||||
|
|
||||||
regression=# select isdefined('a=>NULL','a');
|
regression=# select defined('a=>NULL','a');
|
||||||
isdefined
|
defined
|
||||||
-----------
|
---------
|
||||||
f
|
f
|
||||||
|
|
||||||
Indices
|
Indices
|
||||||
|
|
|
@ -273,39 +273,39 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- exists/defined
|
-- exists/defined
|
||||||
select isexists('a=>NULL, b=>qq', 'a');
|
select exist('a=>NULL, b=>qq', 'a');
|
||||||
isexists
|
exist
|
||||||
----------
|
-------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select isexists('a=>NULL, b=>qq', 'b');
|
select exist('a=>NULL, b=>qq', 'b');
|
||||||
isexists
|
exist
|
||||||
----------
|
-------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select isexists('a=>NULL, b=>qq', 'c');
|
select exist('a=>NULL, b=>qq', 'c');
|
||||||
isexists
|
exist
|
||||||
----------
|
-------
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select isdefined('a=>NULL, b=>qq', 'a');
|
select defined('a=>NULL, b=>qq', 'a');
|
||||||
isdefined
|
defined
|
||||||
-----------
|
---------
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select isdefined('a=>NULL, b=>qq', 'b');
|
select defined('a=>NULL, b=>qq', 'b');
|
||||||
isdefined
|
defined
|
||||||
-----------
|
---------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select isdefined('a=>NULL, b=>qq', 'c');
|
select defined('a=>NULL, b=>qq', 'c');
|
||||||
isdefined
|
defined
|
||||||
-----------
|
---------
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,21 @@ RETURNS bool
|
||||||
AS 'MODULE_PATHNAME','exists'
|
AS 'MODULE_PATHNAME','exists'
|
||||||
LANGUAGE 'C' with (isstrict,iscachable);
|
LANGUAGE 'C' with (isstrict,iscachable);
|
||||||
|
|
||||||
|
CREATE FUNCTION exist(hstore,text)
|
||||||
|
RETURNS bool
|
||||||
|
AS 'MODULE_PATHNAME','exists'
|
||||||
|
LANGUAGE 'C' with (isstrict,iscachable);
|
||||||
|
|
||||||
CREATE FUNCTION isdefined(hstore,text)
|
CREATE FUNCTION isdefined(hstore,text)
|
||||||
RETURNS bool
|
RETURNS bool
|
||||||
AS 'MODULE_PATHNAME','defined'
|
AS 'MODULE_PATHNAME','defined'
|
||||||
LANGUAGE 'C' with (isstrict,iscachable);
|
LANGUAGE 'C' with (isstrict,iscachable);
|
||||||
|
|
||||||
|
CREATE FUNCTION defined(hstore,text)
|
||||||
|
RETURNS bool
|
||||||
|
AS 'MODULE_PATHNAME','defined'
|
||||||
|
LANGUAGE 'C' with (isstrict,iscachable);
|
||||||
|
|
||||||
CREATE FUNCTION delete(hstore,text)
|
CREATE FUNCTION delete(hstore,text)
|
||||||
RETURNS hstore
|
RETURNS hstore
|
||||||
AS 'MODULE_PATHNAME','delete'
|
AS 'MODULE_PATHNAME','delete'
|
||||||
|
|
|
@ -66,12 +66,12 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
|
||||||
|
|
||||||
-- exists/defined
|
-- exists/defined
|
||||||
|
|
||||||
select isexists('a=>NULL, b=>qq', 'a');
|
select exist('a=>NULL, b=>qq', 'a');
|
||||||
select isexists('a=>NULL, b=>qq', 'b');
|
select exist('a=>NULL, b=>qq', 'b');
|
||||||
select isexists('a=>NULL, b=>qq', 'c');
|
select exist('a=>NULL, b=>qq', 'c');
|
||||||
select isdefined('a=>NULL, b=>qq', 'a');
|
select defined('a=>NULL, b=>qq', 'a');
|
||||||
select isdefined('a=>NULL, b=>qq', 'b');
|
select defined('a=>NULL, b=>qq', 'b');
|
||||||
select isdefined('a=>NULL, b=>qq', 'c');
|
select defined('a=>NULL, b=>qq', 'c');
|
||||||
|
|
||||||
-- delete
|
-- delete
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,9 @@ DROP OPERATOR =>( text, text );
|
||||||
|
|
||||||
DROP FUNCTION fetchval(hstore,text);
|
DROP FUNCTION fetchval(hstore,text);
|
||||||
DROP FUNCTION isexists(hstore,text);
|
DROP FUNCTION isexists(hstore,text);
|
||||||
|
DROP FUNCTION exist(hstore,text);
|
||||||
DROP FUNCTION isdefined(hstore,text);
|
DROP FUNCTION isdefined(hstore,text);
|
||||||
|
DROP FUNCTION defined(hstore,text);
|
||||||
DROP FUNCTION delete(hstore,text);
|
DROP FUNCTION delete(hstore,text);
|
||||||
DROP FUNCTION hs_concat(hstore,hstore);
|
DROP FUNCTION hs_concat(hstore,hstore);
|
||||||
DROP FUNCTION hs_contains(hstore,hstore);
|
DROP FUNCTION hs_contains(hstore,hstore);
|
||||||
|
|
Loading…
Reference in New Issue