pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Davies <scldad@sdc.com.au>
To: Hannu Krosing <hannu@trust.ee>
Cc: Byron Nikolaidis <byronn@insightdist.com>
Cc: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] Re: ODBC driver and Dates
Date: Fri, 17 Apr 1998 18:44:58 +0930
Message-ID: <199804170914.SAA29622@mustang.sdc.com.au> (raw)
In-Reply-To: <35370FFA.24E582EF@sid.trust.ee>

> > HERE IS A POSSIBLY USEFUL BUT UNDOCUMENTED FEATURE OF THE NEW ODBC DRIVER:
> > 
> > By the way, there is a feature in this driver that allows you to send simple
> > commands to the driver at connection time.  Its registry key is 'ConnSettings'
> > and it can be on a driver level or datasource level, or both.
> > 
> > Here is an example, if you had a datasource called 'co1', then in the registry
> > under the HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\co1 you would create a String
> > Value called 'ConnSettings' which can contain a list of commands, separated by
> > semicolans, to send to Postgres on a successful connection.  Example, "set geqo
> > to 'off'; set datestyle to 'ISO' "
> > 
> > You can also set this on a driver level so that for any datasource these
> > commands would be set.  That key is
> > HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL
> > and it is also called 'ConnSettings'.
> > 
> > It will first send the driver 'ConnSettings' (if any) followed by the datasource
> > 'ConnSettings' (if any).
> > 
> > This feature has its limitations.   For example, it can only handle commands;
> > not queries that would generate tuples.
> 
> Well, that is a useful feature indeed, and I think that this will solve 
> the whole problem without changing the driver code. But the install
> script 
> should set this to "set Datestyle to 'US';" for all of us poor
> non-americans 
> (and it would'nt hurt those who use the US dates neither).
> 
> > P.S., Please send these notes to the pgsql-interfaces@postgreSQL.org list so
> > that everyone can read them, including me.
> 

Ahah!! A whole new ball game:-))

This indeed sounds very good.

The caveat is that "we poor dumb users" should not need/be allowed to fiddle 
with the registry.

Something like an "Advanced Features" button on the DSN definition form that 
allowed the entry of these commands would be an excellent feature I reckon.

It even fits into the ODBC model as these can be seen as "connection 
attributes" that are being externalised for apps such as MS Query that have no 
other mechanism for setting such attributes.

Cheers,
Strephen
========================================================================
Stephen Davies Consulting	    		                            scldad@sdc.com.au
Adelaide, South Australia.     			                            Voice: 61-8-82728863
Computing & Network solutions.	 	                            Fax: 61-8-82741015





view thread (12+ messages)  latest in thread

Message-ID: <199804170914.SAA29622@mustang.sdc.com.au>
Permalink:  ../199804170914.SAA29622@mustang.sdc.com.au/
Also on:    postgresql.org/message-id/199804170914.SAA29622@mustang.sdc.com.au

 · 

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: scldad@sdc.com.au, hannu@trust.ee, byronn@insightdist.com
  Subject: Re: [INTERFACES] Re: ODBC driver and Dates
  In-Reply-To: <199804170914.SAA29622@mustang.sdc.com.au>

* 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