pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Byron Nikolaidis <byronn@solipsys.com>
To: robertC@opmr.com
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Problem with Postgres/ODBC Driver.
Date: Tue, 31 Aug 1999 14:14:05 -0400
Message-ID: <37CC1B6D.9291E3A8@solipsys.com> (raw)
References: <91E49E736688D21185F500A0C985C70516DE4F@DOOM>



Robert Carbonari wrote:

> <snip>

> My question, then, is this: How can I access fields which have spaces and
> Caps in them {CREATE TABLE table_name ("Project Manager Name" text,
> ...);...} from my VBScript (using the Windows Scripting Host) when I employ
> the Postgres/ODBC driver from Insight?
> Is there some special way to pass these special field names to the driver so
> that it can understand and properly translate them to Postgres (on Linux)?
> Or must I resort to naming the fields in Postgres in the conventional way
> and leave it at that?
> Here is the driver information:
> odbc driver version:  6.30.0250
> postgresql database version: 6.4
>

Version 6.4 of the driver/database and above will handle mixed case and spaces.
In order to preserve spaces and case, you need to use double quotes around the
field names.  This goes for table names as well, which can also have spaces and
mixed case.   I'm not sure if you are directly controlling this in your script
or not.  Some applications (e.g. Access) automatically add the quotes around
field and table names based on some info returns of the driver, such as the
following:

SQL_IDENTIFIER_CASE,
SQL_IDENTIFIER_QUOTE_CHAR,
SQL_QUOTED_IDENTIFIER_CASE

There were some anomolies with some applications that didn't exactly interpret
the above info returns the way I would think they should, and thus wouldn't work
properly with quotes.

Byron




view thread (2+ messages)

Message-ID: <37CC1B6D.9291E3A8@solipsys.com>
Permalink:  ../37CC1B6D.9291E3A8@solipsys.com/
Also on:    postgresql.org/message-id/37CC1B6D.9291E3A8@solipsys.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: byronn@solipsys.com, robertC@opmr.com
  Subject: Re: [INTERFACES] Problem with Postgres/ODBC Driver.
  In-Reply-To: <37CC1B6D.9291E3A8@solipsys.com>

* 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