Re: [INTERFACES] Re: ODBC driver and Dates - Mailing list pgsql-interfaces

From Gerhard Reithofer
Subject Re: [INTERFACES] Re: ODBC driver and Dates
Date
Msg-id Pine.LNX.3.95.980417211253.1610C-100000@at486
Whole thread Raw
In response to Re: [INTERFACES] Re: ODBC driver and Dates  (Aleksey Demakov <avd@avd.garsib.ru>)
List pgsql-interfaces
Hi Hackers,

On 17 Apr 1998, Aleksey Demakov wrote:

> Byron Nikolaidis <byronn@insightdist.com> writes:
>
> > Should the driver query the database (i.e., "show datestyle") to see what format
> > it should use, -OR-, should it be an option for the datasource, where you select
> > what style to use, and the driver sets the style when it makes a connection
> > ("set datestyle")?
>
> I beleave there is no need for such an option. The only thing is
> needed that ODBC-driver and Postgres use the same format during
> connection. Thus opening connection ODBC-driver should always set
> the datestyle which it uses. Asking the datestyle from backend and
> than using appropriate conversion is posible but why to bother with
> this while the opposite (instructing backend what datestyle to use)
> is much simpler to implement and will work equaly well?

I cannot aggree fully.

In my applications, there are many data imports and exports from the Unix
side and Windows side. They normally should look identically.

Another way of representing data is often the pure ascii way - i. e. how
it is sent from the server (e. g. in the older PostODBC versions). A
simple text viewer may be used the display the data.

I personally would like to controll the transfer and translations as data
source options.

E.g. a radio button array:

 Date representation:
  Autodetect [X]
  European   [ ]
  ISO Style  [ ]
  ASCII      [ ]
etc...

IMHO the way Byron implemented special featured is great, but these should
be DOCUMENTED features. An input field in the data source setup dialog
could be used to define these "pre-connect statements". And I think there
are some other UNDOCUMENTED features, which would be very usefull (take a
look at the source)!

And last, some type of mapping table could be used to controll the
different *CHAR* mappings between the server and the frontend applications
(but I don't have a detailed idea how to implement this). This could be
the end of the NAME<>CHAR<>BPCHAR<>VARCHAR<>LONGVARCHAR... discussions.

Bye
    Gerhard

+-----------------+             +--- gerhardr@tech-edv.co.at ---+
| Technische EDV   \ Reithofer / Technical Sofware Developement |
| A-2136 Laa/Thaya  \ Gerhard / Tel +43-2522/8726 +-------------+
| Staatsbahnstr. 100 +-------+ Fax +43-2522/87268 |
+----- http://members.aon.at/tech-edv/Info -------+





pgsql-interfaces by date:

Previous
From: Byron Nikolaidis
Date:
Subject: Re: [INTERFACES] Naming of the PostreSQL ODBC .dll file
Next
From: Byron Nikolaidis
Date:
Subject: Re: ODBC driver