postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: davecramer (@davecramer) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #98: SELECT of a PostgreSQL CHAR/VARCHAR/TEXT Column Using multiple calls SQLGetData results in data truncation (last byte)
Date: Mon, 16 Jun 2025 10:30:59 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
I cannot reproduce the issue.
```
create table public.rantexttab(textcol text);
CREATE TABLE
test=# insert into public.rantexttab values(repeat('A', 1048000) || 'BB');
INSERT 0 1
test=# select length(textcol) from public.rantexttab;
length
---------
1048002
(1 row)
```
```
diff pglob.cpp ~/Downloads/pglob.cpp.txt
48,52c48,51
< ret = SQLConnect(hdlDbc,
< (SQLCHAR*) "psqlodbc_test_dsn", SQL_NTS,
< (SQLCHAR*) "test", SQL_NTS,
< (SQLCHAR*)"test", SQL_NTS);
<
---
> const char* dsnName = "pg16";
> const char* userID = "postgres";
> const char* passwd = "postgres";
> ret = SQLConnect(hdlDbc, (SQLCHAR*)dsnName, SQL_NTS,(SQLCHAR*)userID,SQL_NTS, (SQLCHAR*)passwd, SQL_NTS);
```
Here is the output from my run
```
./pglob
Connecting to database.
Connected to database.
Fetching results...
First Call to GetData:
ind : 1048002
Data: AAAAAAAAAA�
Second Call to GetData:
ind : 1047992
Data: AAAAAAAAAA�
Free handles.
```
view thread (10+ 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 #98: SELECT of a PostgreSQL CHAR/VARCHAR/TEXT Column Using multiple calls SQLGetData results in data truncation (last byte)
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