Re: Junk queries with variables?

From: "Steve - DND" <postgres(at)digitalnothing(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Junk queries with variables?
Date: 2005-02-24 17:10:43
Message-ID: LDEHKBBOEMIJKHKBOFNFIEHFLLAA.postgres@digitalnothing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve - DND 2005-02-24 17:11:04 Re: Junk queries with variables?
Previous Message Alexis Vasquez 2005-02-24 16:32:09 Unsuscribe