mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH () construct.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.70 2005/11/21 12:49:31 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.71 2006/02/27 16:09:49 petere Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* These routines take the parse tree and pick out the
|
||||
@@ -632,7 +632,7 @@ CreateFunction(CreateFunctionStmt *stmt)
|
||||
* In PostgreSQL versions before 6.5, the SQL name of the created
|
||||
* function could not be different from the internal name, and
|
||||
* "prosrc" wasn't used. So there is code out there that does CREATE
|
||||
* FUNCTION xyz AS '' LANGUAGE 'internal'. To preserve some modicum of
|
||||
* FUNCTION xyz AS '' LANGUAGE internal. To preserve some modicum of
|
||||
* backwards compatibility, accept an empty "prosrc" value as meaning
|
||||
* the supplied SQL function name.
|
||||
*/
|
||||
|
||||
@@ -524,7 +524,7 @@ library, depending on whether or not you write a PG_FUNCTION_INFO_V1() for
|
||||
each one.
|
||||
|
||||
The SQL declaration for a dynamically-loaded function is CREATE FUNCTION
|
||||
foo ... LANGUAGE 'C' regardless of whether it is old- or new-style.
|
||||
foo ... LANGUAGE C regardless of whether it is old- or new-style.
|
||||
|
||||
New-style dynamic functions will be invoked directly by fmgr, and will
|
||||
therefore have the same performance as internal functions after the initial
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/mb/conversion_procs
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.16 2006/02/18 16:15:22 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.17 2006/02/27 16:09:49 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -167,7 +167,7 @@ ifeq ($(enable_shared), yes)
|
||||
func=$$1; shift; \
|
||||
obj=$$1; shift; \
|
||||
echo "-- $$se --> $$de"; \
|
||||
echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$$"libdir"/$$obj', '$$func' LANGUAGE 'c' STRICT;"; \
|
||||
echo "CREATE OR REPLACE FUNCTION $$func (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$$"libdir"/$$obj', '$$func' LANGUAGE C STRICT;"; \
|
||||
echo "DROP CONVERSION pg_catalog.$$name;"; \
|
||||
echo "CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM $$func;"; \
|
||||
done > $@
|
||||
|
||||
Reference in New Issue
Block a user