Skip site navigation (1) Skip section navigation (2)

CREATE TABLE IF NOT EXIST

From: "Mike Gagnon" <mike(dot)gagnon(at)bellnet(dot)ca>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: CREATE TABLE IF NOT EXIST
Date: 2008-01-25 14:09:28
Message-ID: 003301c85f5b$e891c8b0$640fa8c0@T60 (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi Postgres Experts,

I'm trying to create tables (if they don't exist) through the ODBC driver.  I've tried the following:

SELECT relname FROM pg_class  WHERE relname = 'mytable';

This works from the psql command line program when logged into my database, but not when connected to my database over ODBC ( I get SQL_NO_DATA back from SQLFetch)

Any ideas?  Are there other ways to find out if a table exists?

Many thanks,
Mike

Responses

pgsql-odbc by date

Next:From: Lathrop_SteveDate: 2008-01-25 14:42:31
Subject: Building ODBC driver issue
Previous:From: Guillaume GautreauDate: 2008-01-22 09:43:08
Subject: Re: Driver 8.1 : fails contacting the server with routable address

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group