mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Deprecate the use of => as an operator name.
In HEAD, emit a warning when an operator named => is defined. In both HEAD and the backbranches (except in 8.2, where contrib modules do not have documentation), document that hstore's text => text operator may be removed in a future release, and encourage the use of the hstore(text, text) function instead. This function only exists in HEAD (previously, it was called tconvert), so backpatch it back to 8.2, when hstore was added. Per discussion.
This commit is contained in:
parent
0a557605f2
commit
b12ca1d561
@ -118,6 +118,12 @@ RETURNS hstore
|
|||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE 'C' with (isstrict,iscachable);
|
LANGUAGE 'C' with (isstrict,iscachable);
|
||||||
|
|
||||||
|
-- For forward compatibility with PostgreSQL >= 9.0
|
||||||
|
CREATE OR REPLACE FUNCTION hstore(text,text)
|
||||||
|
RETURNS hstore
|
||||||
|
AS 'MODULE_PATHNAME', 'tconvert'
|
||||||
|
LANGUAGE C IMMUTABLE; -- not STRICT
|
||||||
|
|
||||||
CREATE OPERATOR => (
|
CREATE OPERATOR => (
|
||||||
LEFTARG = text,
|
LEFTARG = text,
|
||||||
RIGHTARG = text,
|
RIGHTARG = text,
|
||||||
|
@ -21,6 +21,7 @@ DROP FUNCTION hs_concat(hstore,hstore);
|
|||||||
DROP FUNCTION hs_contains(hstore,hstore);
|
DROP FUNCTION hs_contains(hstore,hstore);
|
||||||
DROP FUNCTION hs_contained(hstore,hstore);
|
DROP FUNCTION hs_contained(hstore,hstore);
|
||||||
DROP FUNCTION tconvert(text,text);
|
DROP FUNCTION tconvert(text,text);
|
||||||
|
DROP FUNCTION hstore(text,text);
|
||||||
DROP FUNCTION akeys(hstore);
|
DROP FUNCTION akeys(hstore);
|
||||||
DROP FUNCTION avals(hstore);
|
DROP FUNCTION avals(hstore);
|
||||||
DROP FUNCTION skeys(hstore);
|
DROP FUNCTION skeys(hstore);
|
||||||
|
Loading…
Reference in New Issue
Block a user