From: Steve - DND <postgres@digitalnothing.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Junk queries with variables?
Date: Thu, 24 Feb 2005 10:10:43 -0700
Message-ID: <LDEHKBBOEMIJKHKBOFNFIEHFLLAA.postgres@digitalnothing.com> (raw)
In-Reply-To: <20050224074045.GA30413@winnie.fuhr.org>
>
> I don't know about pgAdmin, but in psql you can use \set:
>
> \set id 1
> SELECT * FROM foo WHERE id = :id;
>
> \set name '\'Some Name\''
> SELECT * FROM foo WHERE name = :name;
>
Whenever I try the above I get an error at the backslash. Do I need to
create a different language for this? Right now I only have plpgsql
available.
Thanks,
Steve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgres@digitalnothing.com, mike@fuhr.org
Subject: Re: Junk queries with variables?
In-Reply-To: <LDEHKBBOEMIJKHKBOFNFIEHFLLAA.postgres@digitalnothing.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox