tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
377 stars 101 forks source link

Fix fetching blob fields larger then 4096 bytes #294

Closed manio closed 2 years ago

manio commented 2 years ago

Blob fields was truncated to 4096 because dbdatlen() was returning incorrect size without TEXTSIZE server option set properly. This commit fixes this problem, so the blobs are properly fetched and converted to PostgreSQL 'bytea' type column.

Fixes #81

jenkins-juliogonzalez commented 2 years ago

Can one of the admins verify this patch?

GeoffMontee commented 2 years ago

Test this, please

juliogonzalez commented 2 years ago

Seems GitHub delivered data to Jenkins, but Jenkins ignored the PR. I will need to review why.

Test this, please.

juliogonzalez commented 2 years ago

It's not a rights problem, since it doesn't even act after my comment.

juliogonzalez commented 2 years ago

Seems my comment was ignored becayse the PR is closed:

2021-10-16 15:30:53.476+0000 [id=114791]        INFO    o.j.p.ghprb.GhprbRootAction#handleAction: Checking PR #294 for tds-fdw/tds_fdw
2021-10-16 15:30:53.646+0000 [id=114791]        INFO    o.j.p.ghprb.GhprbGitHubAuth#checkSignature: Signatures checking OK
2021-10-16 15:30:53.697+0000 [id=114805]        INFO    o.j.plugins.ghprb.GhprbTrigger#handlePR: Checking PR #294 for job tds_fdw-build-pr
2021-10-16 15:30:54.222+0000 [id=111042]        INFO    o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/tds-fdw/tds_fdw from 127.0.0.1 ⇒ http://jenkins.juliogonzalez.es:8080/github-webhook/
2021-10-16 15:30:54.277+0000 [id=111042]        INFO    o.j.p.g.w.s.DefaultPushGHEventSubscriber$1#run: Poked tds_fdw-build
2021-10-16 15:30:58.414+0000 [id=114806]        INFO    c.c.jenkins.GitHubPushTrigger$1#run: SCM changes detected in tds_fdw-build. Triggering #2190
2021-10-16 15:32:22.575+0000 [id=114791]        INFO    o.j.p.ghprb.GhprbRootAction#handleAction: Skip comment on closed PR

Sadly I don't have logs from the time when @GeoffMontee tried to trigger the tests with the comment, so I don't know if it was a temporary issue, or a problem with Geoff's rights (all members of the tds-fdw organization have rights to trigger tests, so that should not be the problem.

In any case, the tests passed after the PR was merged, on the master branch: https://jenkins.juliogonzalez.es/job/tds_fdw-build/2190/

@GeoffMontee can you launch the tests at https://github.com/tds-fdw/tds_fdw/pull/293, so I can check what's wrong?

calsql commented 2 years ago

@GeoffMontee - could you test this please let us know.