information_schema.columns changes needed for OLEDB

From: Konstantin Izmailov <kizmailov(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: information_schema.columns changes needed for OLEDB
Date: 2009-05-22 15:27:01
Message-ID: 1225592b0905220827r6efe11bducd9741b9e0f475d8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-22 15:28:47 Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2
Previous Message Josh Berkus 2009-05-22 14:40:32 Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2