Re: Check for table existence

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Michael Knudsen <mk267673(at)but(dot)auc(dot)dk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Check for table existence
Date: 2001-11-30 02:05:25
Message-ID: 20011129190525.A16107@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jason Kwok 2001-11-30 02:43:26 Selecting from a dynamic name
Previous Message Christopher Kings-Lynne 2001-11-30 01:54:29 Re: Can I CONSTRAIN a particular value to be UNIQUE?