Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 280759FB30B for ; Fri, 27 Oct 2006 10:32:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 83249-02 for ; Fri, 27 Oct 2006 13:31:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by postgresql.org (Postfix) with ESMTP id BF4199FB314 for ; Fri, 27 Oct 2006 10:31:07 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id g2so1071737nfe for ; Fri, 27 Oct 2006 06:31:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=eCRChXBfOEUIcslHbUgD98t/iHMpr9LE2gHkOrg68GvntUZ5LHreoGIqb4jCroqGlsUI2OtLQA5iAJz48TO6FcnKygVdIJEVBS0d5GMEf4O1Ir+Ceq1ZcpqNqgMo18/CuOp4ICVIM68FpiHbrAwHsy7rWPu60ccHdPuBdDPpv9Q= Received: by 10.49.8.10 with SMTP id l10mr912695nfi; Fri, 27 Oct 2006 06:31:04 -0700 (PDT) Received: by 10.48.215.19 with HTTP; Fri, 27 Oct 2006 06:31:03 -0700 (PDT) Message-ID: <4f4c2a010610270631q73de201tb98446f64b942a0e@mail.gmail.com> Date: Fri, 27 Oct 2006 09:31:03 -0400 From: "Jon Horsman" To: pgsql-sql@postgresql.org Subject: How to query information schema from shell script MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/213 X-Sequence-Number: 26602 Hey, I'm trying to figure out how i can query the postgres information schema from a bourne shell script on linux. I need to know if a user/table exists. Does someone mind giving me a quick example of how this works, is this possible? Thanks, Jon.