information_schema.columns changes needed for OLEDB - Mailing list pgsql-hackers

From Konstantin Izmailov
Subject information_schema.columns changes needed for OLEDB
Date
Msg-id 1225592b0905220827r6efe11bducd9741b9e0f475d8@mail.gmail.com
Whole thread Raw
Responses Re: information_schema.columns changes needed for OLEDB  (Peter Eisentraut <peter_e@gmx.net>)
Re: information_schema.columns changes needed for OLEDB  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
As we discussed at pgcon2009 there are some changes/fixes necessary in information_schema.columns to allow correct work of applications and services via OLEDB on Windows. Here are some:

1. data_type field contains types names that are not recognized by MS apps.

Code around: rename types on the fly, e.g.

integer -> int

character varying -> varchar

character -> char

timestamp without time zone -> datetime

bytea -> image

2. character_maximum_length field

Code around: change value for text abd bytea types

[text] 1073741823

[bytea] 2147483647

3. character_octet_length should always be double of character_maximum_length (due to Unicode character size on Windows which is 2).

4. datetime_precision field is not always correct

Code around: change value of the fly, e.g. if value is not null then

[numeric] keep the value (ok)

[bigint] set value to 19

all other set to 10

5. numeric_precision_radix field should always be equal to 10

6. datetime_precision field, minor changes

Code around: change value on the fly, e.g.

[date] set value to zero

[datetime] set value to 3

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2
Next
From: Alvaro Herrera
Date:
Subject: Re: patch for ja.po