aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2006-10-11 16:42:51 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2006-10-11 16:42:51 +0000
commit3f16647960ceb471dfacadc5d3a8c87601429256 (patch)
tree9ac00fed0a49e0ff503d2de61e7dc6733d76d4a8
parent4e46f4799ea997cbf7ae136c23483dbd95124e30 (diff)
downloadpostgresql-3f16647960ceb471dfacadc5d3a8c87601429256.tar.gz
postgresql-3f16647960ceb471dfacadc5d3a8c87601429256.zip
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
-rw-r--r--contrib/hstore/README.hstore14
-rw-r--r--contrib/hstore/expected/hstore.out36
-rw-r--r--contrib/hstore/hstore.sql.in10
-rw-r--r--contrib/hstore/sql/hstore.sql12
-rw-r--r--contrib/hstore/uninstall_hstore.sql2
5 files changed, 43 insertions, 31 deletions
diff --git a/contrib/hstore/README.hstore b/contrib/hstore/README.hstore
index 601ae49259d..5fdceb1b986 100644
--- a/contrib/hstore/README.hstore
+++ b/contrib/hstore/README.hstore
@@ -117,20 +117,20 @@ regression=# select * from each('a=>1,b=>2');
a | 1
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.
-regression=# select isexists('a=>1','a');
- isexists
+regression=# select exist('a=>1','a');
+ exist
----------
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.
-regression=# select isdefined('a=>NULL','a');
- isdefined
------------
+regression=# select defined('a=>NULL','a');
+ defined
+---------
f
Indices
diff --git a/contrib/hstore/expected/hstore.out b/contrib/hstore/expected/hstore.out
index 61c96a4b976..94194a6d00b 100644
--- a/contrib/hstore/expected/hstore.out
+++ b/contrib/hstore/expected/hstore.out
@@ -273,39 +273,39 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
(1 row)
-- exists/defined
-select isexists('a=>NULL, b=>qq', 'a');
- isexists
-----------
+select exist('a=>NULL, b=>qq', 'a');
+ exist
+-------
t
(1 row)
-select isexists('a=>NULL, b=>qq', 'b');
- isexists
-----------
+select exist('a=>NULL, b=>qq', 'b');
+ exist
+-------
t
(1 row)
-select isexists('a=>NULL, b=>qq', 'c');
- isexists
-----------
+select exist('a=>NULL, b=>qq', 'c');
+ exist
+-------
f
(1 row)
-select isdefined('a=>NULL, b=>qq', 'a');
- isdefined
------------
+select defined('a=>NULL, b=>qq', 'a');
+ defined
+---------
f
(1 row)
-select isdefined('a=>NULL, b=>qq', 'b');
- isdefined
------------
+select defined('a=>NULL, b=>qq', 'b');
+ defined
+---------
t
(1 row)
-select isdefined('a=>NULL, b=>qq', 'c');
- isdefined
------------
+select defined('a=>NULL, b=>qq', 'c');
+ defined
+---------
f
(1 row)
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in
index c77fc7d4fb6..95cecf15d29 100644
--- a/contrib/hstore/hstore.sql.in
+++ b/contrib/hstore/hstore.sql.in
@@ -35,11 +35,21 @@ RETURNS bool
AS 'MODULE_PATHNAME','exists'
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)
RETURNS bool
AS 'MODULE_PATHNAME','defined'
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)
RETURNS hstore
AS 'MODULE_PATHNAME','delete'
diff --git a/contrib/hstore/sql/hstore.sql b/contrib/hstore/sql/hstore.sql
index 0931616077b..f268da557c8 100644
--- a/contrib/hstore/sql/hstore.sql
+++ b/contrib/hstore/sql/hstore.sql
@@ -66,12 +66,12 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
-- exists/defined
-select isexists('a=>NULL, b=>qq', 'a');
-select isexists('a=>NULL, b=>qq', 'b');
-select isexists('a=>NULL, b=>qq', 'c');
-select isdefined('a=>NULL, b=>qq', 'a');
-select isdefined('a=>NULL, b=>qq', 'b');
-select isdefined('a=>NULL, b=>qq', 'c');
+select exist('a=>NULL, b=>qq', 'a');
+select exist('a=>NULL, b=>qq', 'b');
+select exist('a=>NULL, b=>qq', 'c');
+select defined('a=>NULL, b=>qq', 'a');
+select defined('a=>NULL, b=>qq', 'b');
+select defined('a=>NULL, b=>qq', 'c');
-- delete
diff --git a/contrib/hstore/uninstall_hstore.sql b/contrib/hstore/uninstall_hstore.sql
index 153337ccb0b..bfa2e738dce 100644
--- a/contrib/hstore/uninstall_hstore.sql
+++ b/contrib/hstore/uninstall_hstore.sql
@@ -13,7 +13,9 @@ DROP OPERATOR =>( text, text );
DROP FUNCTION fetchval(hstore,text);
DROP FUNCTION isexists(hstore,text);
+DROP FUNCTION exist(hstore,text);
DROP FUNCTION isdefined(hstore,text);
+DROP FUNCTION defined(hstore,text);
DROP FUNCTION delete(hstore,text);
DROP FUNCTION hs_concat(hstore,hstore);
DROP FUNCTION hs_contains(hstore,hstore);