Re: psql substitution variables

From: Harald Fuchs <hf1110x(at)protecting(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql substitution variables
Date: 2007-01-23 23:21:44
Message-ID: pu1wllgwhj.fsf@srv.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In article <b42b73150701230831t317595f6o3beb37d43f363412(at)mail(dot)gmail(dot)com>,
"Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:

> 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;
> [...]

Can't you put the psql call into a shell script and use shell variable
substitution for that?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Sanford 2007-01-23 23:22:35 Date Questions
Previous Message Carlos 2007-01-23 21:55:50 Converting 7.x to 8.x