Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAU24pm44218 for ; Thu, 29 Nov 2001 21:04:52 -0500 (EST) (envelope-from roberto@brasileiro.net) Received: from roberto by brasileiro.net with local (Exim 3.32 #1 (Debian)) id 169d3N-0004G7-00; Thu, 29 Nov 2001 19:05:25 -0700 Date: Thu, 29 Nov 2001 19:05:25 -0700 From: Roberto Mello To: Michael Knudsen Cc: pgsql-sql@postgresql.org Subject: Re: Check for table existence Message-ID: <20011129190525.A16107@cc.usu.edu> References: <3C055B7E.BB52F0F1@but.auc.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C055B7E.BB52F0F1@but.auc.dk> User-Agent: Mutt/1.3.23i X-Archive-Number: 200111/427 X-Sequence-Number: 5809 On Wed, Nov 28, 2001 at 10:47:42PM +0100, Michael Knudsen wrote: > Hi group > > First, let me say that I am new to postgres. I used MySQL before, but.. > ehm.. > > I am trying to do a small program (in C), and I have stumbled on to some > problems: > > 1. How can I check if a given table exists? > 2. How can I check if a given existing table has the right layout? (Correct > column names and types) There's a function to check for a table's existance in the PostgreSQL Cookbook (http://www.brasileiro.net/postgres/) -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Developer Daddy, why doesn't this magnet pick up this floppy?