Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f16647

Browse files
committed
Rename function 'isexists' and 'isdefined' to
'exist' and 'defined' accordingly. Old namesare saved not mentioned in docs - for compatibilitywith old applications.Per discussionhttp://archives.postgresql.org/pgsql-hackers/2006-10/msg00571.php
1 parent4e46f47 commit3f16647

File tree

5 files changed

+43
-31
lines changed

5 files changed

+43
-31
lines changed

‎contrib/hstore/README.hstore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ regression=# select * from each('a=>1,b=>2');
117117
a | 1
118118
b | 2
119119

120-
*isexists (hstore,text) - returns 'true if key is exists in hstore and
120+
*exist (hstore,text) - returns 'true if key is exists in hstore and
121121
false otherwise.
122122

123-
regression=# selectisexists('a=>1','a');
124-
isexists
123+
regression=# selectexist('a=>1','a');
124+
exist
125125
----------
126126
t
127127

128-
*isdefined (hstore,text) - returns true if key is exists in hstore and
128+
*defined (hstore,text) - returns true if key is exists in hstore and
129129
its value is not NULL.
130130

131-
regression=# selectisdefined('a=>NULL','a');
132-
isdefined
133-
-----------
131+
regression=# selectdefined('a=>NULL','a');
132+
defined
133+
---------
134134
f
135135

136136
Indices

‎contrib/hstore/expected/hstore.out

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -273,39 +273,39 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
273273
(1 row)
274274

275275
-- exists/defined
276-
selectisexists('a=>NULL, b=>qq', 'a');
277-
isexists
278-
----------
276+
selectexist('a=>NULL, b=>qq', 'a');
277+
exist
278+
-------
279279
t
280280
(1 row)
281281

282-
selectisexists('a=>NULL, b=>qq', 'b');
283-
isexists
284-
----------
282+
selectexist('a=>NULL, b=>qq', 'b');
283+
exist
284+
-------
285285
t
286286
(1 row)
287287

288-
selectisexists('a=>NULL, b=>qq', 'c');
289-
isexists
290-
----------
288+
selectexist('a=>NULL, b=>qq', 'c');
289+
exist
290+
-------
291291
f
292292
(1 row)
293293

294-
selectisdefined('a=>NULL, b=>qq', 'a');
295-
isdefined
296-
-----------
294+
selectdefined('a=>NULL, b=>qq', 'a');
295+
defined
296+
---------
297297
f
298298
(1 row)
299299

300-
selectisdefined('a=>NULL, b=>qq', 'b');
301-
isdefined
302-
-----------
300+
selectdefined('a=>NULL, b=>qq', 'b');
301+
defined
302+
---------
303303
t
304304
(1 row)
305305

306-
selectisdefined('a=>NULL, b=>qq', 'c');
307-
isdefined
308-
-----------
306+
selectdefined('a=>NULL, b=>qq', 'c');
307+
defined
308+
---------
309309
f
310310
(1 row)
311311

‎contrib/hstore/hstore.sql.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,21 @@ RETURNS bool
3535
AS 'MODULE_PATHNAME','exists'
3636
LANGUAGE 'C' with (isstrict,iscachable);
3737

38+
CREATE FUNCTION exist(hstore,text)
39+
RETURNS bool
40+
AS 'MODULE_PATHNAME','exists'
41+
LANGUAGE 'C' with (isstrict,iscachable);
42+
3843
CREATE FUNCTION isdefined(hstore,text)
3944
RETURNS bool
4045
AS 'MODULE_PATHNAME','defined'
4146
LANGUAGE 'C' with (isstrict,iscachable);
4247

48+
CREATE FUNCTION defined(hstore,text)
49+
RETURNS bool
50+
AS 'MODULE_PATHNAME','defined'
51+
LANGUAGE 'C' with (isstrict,iscachable);
52+
4353
CREATE FUNCTION delete(hstore,text)
4454
RETURNS hstore
4555
AS 'MODULE_PATHNAME','delete'

‎contrib/hstore/sql/hstore.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ select ('aa=>NULL, c=>d , b=>16'::hstore->'aa') is null;
6666

6767
-- exists/defined
6868

69-
selectisexists('a=>NULL, b=>qq','a');
70-
selectisexists('a=>NULL, b=>qq','b');
71-
selectisexists('a=>NULL, b=>qq','c');
72-
selectisdefined('a=>NULL, b=>qq','a');
73-
selectisdefined('a=>NULL, b=>qq','b');
74-
selectisdefined('a=>NULL, b=>qq','c');
69+
selectexist('a=>NULL, b=>qq','a');
70+
selectexist('a=>NULL, b=>qq','b');
71+
selectexist('a=>NULL, b=>qq','c');
72+
selectdefined('a=>NULL, b=>qq','a');
73+
selectdefined('a=>NULL, b=>qq','b');
74+
selectdefined('a=>NULL, b=>qq','c');
7575

7676
-- delete
7777

‎contrib/hstore/uninstall_hstore.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ DROP OPERATOR =>( text, text );
1313

1414
DROPFUNCTION fetchval(hstore,text);
1515
DROPFUNCTION isexists(hstore,text);
16+
DROPFUNCTION exist(hstore,text);
1617
DROPFUNCTION isdefined(hstore,text);
18+
DROPFUNCTION defined(hstore,text);
1719
DROPFUNCTIONdelete(hstore,text);
1820
DROPFUNCTION hs_concat(hstore,hstore);
1921
DROPFUNCTION hs_contains(hstore,hstore);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp