How can I use parameters in plain sql

From: John Adams <john_adams_mail(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How can I use parameters in plain sql
Date: 2010-09-03 18:45:38
Message-ID: 444949.50216.qm@web114303.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can I use parameters in plain sql like sql server.

FICTIONAL example that works for sql server:
declare @i int;
set @i = 1;
select * from mytable where id=(at)i;

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Kupershmidt 2010-09-03 18:54:03 funkiness with '1999-12-31 19:00:00-05'::timestamp with time zone
Previous Message Bayless Kirtley 2010-09-03 18:34:30 Re: Connection question