pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedunicode vs non-unicode ODBC driver
2+ messages / 2 participants
[nested] [flat]
* unicode vs non-unicode ODBC driver
@ 2010-01-12 23:48 the6campbells <the6campbells@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: the6campbells @ 2010-01-12 23:48 UTC (permalink / raw)
To: pgsql-odbc
Consider a simple scenario.
CREATE DATABASE "TEST1"
WITH OWNER = postgres
ENCODING = 'WIN1252'
LC_COLLATE = 'English, United States'
LC_CTYPE = 'English, United States'
CONNECTION LIMIT = -1;
CREATE TABLE z
(
c1 character(6)
)
If you invoke sqlColumns the data type returned from the column changes
depending on if you used the UNICODE or non-UNICODE driver. This is with the
8.04.01 driver.
Get Data All:
"TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE",
"TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX", "NULLABLE", "REMARKS",
"COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH",
"ORDINAL_POSITION", "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE",
"AUTO_INCREMENT", "PHYSICAL NUMBER", "TABLE OID", "BASE TYPEID"
"TEST1", "public", "z", "c1", 1, "bpchar", 6, 6, <Null>, <Null>, 1, "",
<Null>, 1, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819, 0
1 row fetched from 24 columns.
Get Data All:
"TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE",
"TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX", "NULLABLE", "REMARKS",
"COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH",
"ORDINAL_POSITION", "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE",
"AUTO_INCREMENT", "PHYSICAL NUMBER", "TABLE OID", "BASE TYPEID"
"TEST1", "public", "z", "c1", -8, "bpchar", 6, 12, <Null>, <Null>, 1, "",
<Null>, -8, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819, 0
1 row fetched from 24 columns.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: unicode vs non-unicode ODBC driver
@ 2010-01-13 09:36 Hiroshi Inoue <inoue@tpf.co.jp>
parent: the6campbells <the6campbells@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Hiroshi Inoue @ 2010-01-13 09:36 UTC (permalink / raw)
To: the6campbells <the6campbells@gmail.com>; +Cc: pgsql-odbc
the6campbells wrote:
>
> Consider a simple scenario.
>
> CREATE DATABASE "TEST1"
> WITH OWNER = postgres
> ENCODING = 'WIN1252'
> LC_COLLATE = 'English, United States'
> LC_CTYPE = 'English, United States'
> CONNECTION LIMIT = -1;
>
> CREATE TABLE z
> (
> c1 character(6)
> )
>
> If you invoke sqlColumns the data type returned from the column changes
> depending on if you used the UNICODE or non-UNICODE driver. This is with
> the 8.04.01 driver.
>
> Get Data All:
> "TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME",
> "DATA_TYPE", "TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX",
> "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE",
> "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION",
> "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE", "AUTO_INCREMENT", "PHYSICAL
> NUMBER", "TABLE OID", "BASE TYPEID"
> "TEST1", "public", "z", "c1", 1, "bpchar", 6, 6, <Null>, <Null>, 1, "",
> <Null>, 1, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819, 0
> 1 row fetched from 24 columns.
It returns SQL_CHAR(=1).
> Get Data All:
> "TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME",
> "DATA_TYPE", "TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX",
> "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE",
> "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION",
> "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE", "AUTO_INCREMENT", "PHYSICAL
> NUMBER", "TABLE OID", "BASE TYPEID"
> "TEST1", "public", "z", "c1", -8, "bpchar", 6, 12, <Null>, <Null>, 1,
> "", <Null>, -8, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819, 0
> 1 row fetched from 24 columns.
It returns SQL_WCHAR(=-8).
regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-01-13 09:36 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-01-12 23:48 unicode vs non-unicode ODBC driver the6campbells <the6campbells@gmail.com>
2010-01-13 09:36 ` Hiroshi Inoue <inoue@tpf.co.jp>
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