title: How do you use variables in a simple PostgreSQL script?
body: <p>For example, in MS-SQL, you can open up a query window and run the following:</p>
  
  <pre><code>DECLARE @List AS VARCHAR(8)
  
  SELECT @List = 'foobar'
  
  SELECT *
  FROM   dbo.PubLists
  WHERE  Name = @List
  </code></pre>
  
  <p>How is this done in PostgreSQL?  Can it be done?</p>