selecting into a variable like @var=select ... - Mailing list pgsql-general

From joseph speigle
Subject selecting into a variable like @var=select ...
Date
Msg-id 20031216171217.GA5193@www.sirfsup.com
Whole thread Raw
Responses Re: selecting into a variable like @var=select ...
List pgsql-general
hello list,

I want to do something like the following:

address=# @var = select max(id) from passwd;
ERROR:  parser: parse error at or near "@" at character 1
address=# var = select max(id) from passwd;
ERROR:  parser: parse error at or near "var" at character 1
address=# :var = select max(id) from passwd;
ERROR:  parser: parse error at or near ":" at character 1
address=#

so that I could then issue

create sequence passwd_id_seq start @var increment 1

how can I declare and capture output into this variable? Or, should I create a function, if it is possible to issue a
"create"statement inside a procedure body? 

--
joe speigle

pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Authentication Question
Next
From: "Rick Gigger"
Date:
Subject: Re: add column sillyness