From 865f14a2d31af23a05bbf2df04c274629c5d5c4d Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 10 Mar 2015 10:59:11 -0400 Subject: Allow named parameters to be specified using => in addition to := SQL has standardized on => as the use of to specify named parameters, and we've wanted for many years to support the same syntax ourselves, but this has been complicated by the possible use of => as an operator name. In PostgreSQL 9.0, we began emitting a warning when an operator named => was defined, and in PostgreSQL 9.2, we stopped shipping a =>(text, text) operator as part of hstore. By the time the next major version of PostgreSQL is released, => will have been deprecated for a full five years, so hopefully there won't be too many people still relying on it. We continue to support := for compatibility with previous PostgreSQL releases. Pavel Stehule, reviewed by Petr Jelinek, with a few documentation tweaks by me. --- src/backend/commands/operatorcmds.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/backend/commands/operatorcmds.c') diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c index 1efaacfd5e2..b4a1aac3a14 100644 --- a/src/backend/commands/operatorcmds.c +++ b/src/backend/commands/operatorcmds.c @@ -87,16 +87,6 @@ DefineOperator(List *names, List *parameters) /* Convert list of names to a name and namespace */ oprNamespace = QualifiedNameGetCreationNamespace(names, &oprName); - /* - * The SQL standard committee has decided that => should be used for named - * parameters; therefore, a future release of PostgreSQL may disallow it - * as the name of a user-defined operator. - */ - if (strcmp(oprName, "=>") == 0) - ereport(WARNING, - (errmsg("=> is deprecated as an operator name"), - errdetail("This name may be disallowed altogether in future versions of PostgreSQL."))); - /* Check we have creation rights in target namespace */ aclresult = pg_namespace_aclcheck(oprNamespace, GetUserId(), ACL_CREATE); if (aclresult != ACLCHECK_OK) -- cgit v1.2.3