Quoting in stored procedures

Поиск
Список
Период
Сортировка
От Jochen Topf
Тема Quoting in stored procedures
Дата
Msg-id 19990828231930.A7802@eldorado.inka.de
обсуждение исходный текст
Список pgsql-hackers
The syntax needed for defining functions is quite annoying because of the
needed quoting. Example:

CREATE FUNCTION bla (int4) RETURNS char AS '       BEGIN               RETURN ''Two quotes needed''       END;
' LANGUAGE 'plpgsql';

How about allowing something like in shell here-documents:

CREATE FUNCTION bla (int4) RETURNS char LANGUAGE 'plpgsql' UNTIL '__EOF__';       BEGIN               RETURN 'Only one
quoteneeded'       END;
 
__EOF__

Or similar. The __EOF__ is of course totally arbitrary and every string can
be used, so this will work with any language used.

jochen



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Spirou
Дата:
Сообщение: [Fwd: bug ? get_groname: group 0 not found]
Следующее
От: pgsql-hackers@mail.remote.org
Дата:
Сообщение: Quoting in stored procedures