Re: [HACKERS] Quoting in stored procedures

Поиск
Список
Период
Сортировка
От pgsql-hackers@mail.remote.org
Тема Re: [HACKERS] Quoting in stored procedures
Дата
Msg-id 19990830225430.A10255@remote.org
обсуждение исходный текст
Список pgsql-hackers
> and why not something like:
>
> CREATE FUNCTION first_word ( :x CHAR VARYING(1000) )
>    RETURNS CHAR VARYING(40)
>    LANGUAGE SQL
>    RETURN TRIM (SUBSTRING ((:X || ' ') FROM 1 FOR POSITION (' ' IN (:X || '')
> )));
>
> as described in SQL/PSM (SQL Persistent Stored Modules) (see "A Guide To The
> SQL Standard" apendix E)
> instead of re-invent the wheel. ;)

Because the SQL parser has to parse the stored procedure to find the end. In
postgres you can have embedded tcl and any arbitrary language, so it is quite
difficult to handle that properly.

jochen


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

Предыдущее
От: "Hub.Org News Admin"
Дата:
Сообщение: ...
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Implications of multi-byte support in a distribution