psql substitution variables

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема psql substitution variables
Дата
Msg-id b42b73150701230831t317595f6o3beb37d43f363412@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
can anybody think of of a way to sneak these into dollar quoted
strings for substitution into create function?

would i would ideally like to do is (from inside psql shell)

\set foo 500

create function bar() returns int as
$$
  declare
    baz int default :foo;
[...]

that would eliminate the need for using the c preprocessor (or similar
tool) in some cases that require substitution in that way and (best of
all) allow psql to grok pre defined constants defined externally.

merlin

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

Предыдущее
От: "Steven De Vriendt"
Дата:
Сообщение: PostgreSQL 8.1: createdb: xflush error ?
Следующее
От: Richard Troy
Дата:
Сообщение: Re: Password encryption method