postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: df7cb (@df7cb) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #51: SQL_DESC_OCTET_LENGTH regression test difference
Date: Fri, 04 Oct 2024 14:57:29 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Running that against 16 and 17 gives the same results (modulo different pg_temp_NN nspname and table oid).
```
CREATE TEMPORARY TABLE desctable (col1 int4 not null, col2 numeric(4,2), col3 varchar(10) not null, col4 bigint not null);
select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod,
a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype
when 'd' then t.typbasetype else 0 end, t.typtypmod, 0, attidentity, c.relhassubclass from
(((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid =
'desctable'::regclass)
inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid)
inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and
d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum;
nspname │ relname │ attname │ atttypid │ typname │ attnum │ attlen │ atttypmod │ attnotnull │ relhasrules │ relkind │ oid │ pg_get_expr │ case │ typtypmod │ ?column? │ attidentity │ relhassubclass
────────────┼───────────┼─────────┼──────────┼─────────┼────────┼────────┼───────────┼────────────┼─────────────┼─────────┼───────┼─────────────┼──────┼───────────┼──────────┼─────────────┼────────────────
pg_temp_50 │ desctable │ col1 │ 23 │ int4 │ 1 │ 4 │ -1 │ t │ f │ r │ 64095 │ ∅ │ 0 │ -1 │ 0 │ │ f
pg_temp_50 │ desctable │ col2 │ 1700 │ numeric │ 2 │ -1 │ 262150 │ f │ f │ r │ 64095 │ ∅ │ 0 │ -1 │ 0 │ │ f
pg_temp_50 │ desctable │ col3 │ 1043 │ varchar │ 3 │ -1 │ 14 │ t │ f │ r │ 64095 │ ∅ │ 0 │ -1 │ 0 │ │ f
pg_temp_50 │ desctable │ col4 │ 20 │ int8 │ 4 │ 8 │ -1 │ t │ f │ r │ 64095 │ ∅ │ 0 │ -1 │ 0 │ │ f
(4 Zeilen)
```
There are already two expected output files in test/expected/descrec.out and test/expected/descrec_1.out with this difference:
```
--- test/expected/descrec_1.out 2024-10-04 16:48:37.623757902 +0200
+++ test/expected/descrec.out 2024-10-04 16:48:37.623757902 +0200
@@ -19,7 +19,7 @@
-- Column 3 --
SQL_DESC_NAME: col3
SQL_DESC_TYPE: 12
-SQL_DESC_OCTET_LENGTH: 20
+SQL_DESC_OCTET_LENGTH: 40
SQL_DESC_PRECISION: 0
SQL_DESC_SCALE: 0
SQL_DESC_NULLABLE: 0
```
I haven't yet figured out what that length means, but perhaps "10" is another valid output besides 20 and 40?
(I hate pg_regress for making it hard to put comments on _1.out alternate output files.)
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://postgresql-interfaces/psqlodbc
Cc: [email protected], [email protected]
Subject: Re: [postgresql-interfaces/psqlodbc] issue #51: SQL_DESC_OCTET_LENGTH regression test difference
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox