psql substitution variables - Mailing list pgsql-general

From Merlin Moncure
Subject psql substitution variables
Date
Msg-id b42b73150701230831t317595f6o3beb37d43f363412@mail.gmail.com
Whole thread Raw
List 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 by date:

Previous
From: "Steven De Vriendt"
Date:
Subject: PostgreSQL 8.1: createdb: xflush error ?
Next
From: Richard Troy
Date:
Subject: Re: Password encryption method