Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5SCcka94404 for ; Thu, 28 Jun 2001 08:38:46 -0400 (EDT) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5S125a81085; Wed, 27 Jun 2001 21:02:05 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f5S0iWK31805; Wed, 27 Jun 2001 20:44:32 -0400 (EDT) (envelope-from news) From: Wayne Johnson X-Newsgroups: comp.databases.postgresql.interfaces, comp.databases.postgresql.questions Subject: Calling psql from a shell script Date: Wed, 27 Jun 2001 19:44:30 -0500 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 8 Message-ID: <3B3A7DEE.1FE009CE@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org To: wdtj@yahoo.com X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en To: pgsql-general@postgresql.org.pgsql-interfaces@postgresql.org X-Archive-Number: 200106/81 X-Sequence-Number: 1744 I am writing some shell scripts that need to access Postgresql. What is the best way to select a record and have shell variables set to the results. Is there a way to get psql to output data in quoted CSV? TIA.