Re: [INTERFACES] Re: ODBC driver and Dates

From: Gerhard Reithofer <gerhardr(at)tech-edv(dot)co(dot)at>
To: Aleksey Demakov <avd(at)avd(dot)garsib(dot)ru>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, byronn(at)insightdist(dot)com
Subject: Re: [INTERFACES] Re: ODBC driver and Dates
Date: 1998-04-17 20:38:36
Message-ID: Pine.LNX.3.95.980417211253.1610C-100000@at486
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi Hackers,

On 17 Apr 1998, Aleksey Demakov wrote:

> Byron Nikolaidis <byronn(at)insightdist(dot)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(at)tech-edv(dot)co(dot)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 -------+

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Byron Nikolaidis 1998-04-17 21:55:06 Re: [INTERFACES] Naming of the PostreSQL ODBC .dll file
Previous Message Byron Nikolaidis 1998-04-17 20:33:22 Re: ODBC driver (SQLGetTypeInfo)