From: Mike Gagnon <mike.gagnon@bellnet.ca>
To: pgsql-odbc@postgresql.org
Subject: CREATE TABLE IF NOT EXIST
Date: Fri, 25 Jan 2008 09:09:28 -0500
Message-ID: <003301c85f5b$e891c8b0$640fa8c0@T60> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: mike.gagnon@bellnet.ca
Subject: Re: CREATE TABLE IF NOT EXIST
In-Reply-To: <003301c85f5b$e891c8b0$640fa8c0@T60>
References: <003301c85f5b$e891c8b0$640fa8c0@T60>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox