DevHeads.net

ODBC

Cursor for a positioned update: "cursor <name> does not exist" error

I'm using postgresql-odbc-09.01.0200 with postgresl-9.2.4

According to the documention for SQLSetCursorName
(<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms711707%28v=vs.85%29.aspx" title="http://msdn.microsoft.com/en-us/library/windows/desktop/ms711707%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms711707%28v=vs....</a>)
I don't really need to use it, and ODBC will use a default name.

With unixODBC and a Postgresql connection handle, SQLGetInfo() shows
SQL_CA1_POS_UPDATE capability for SQL_STATIC_CURSOR_ATTRIBUTES1, and
SQL_KEYSET_CURSOR_ATTRIBUTES1.

I tried using both a static and a keyset cursor, by setting
SQL_ATTR_CURSOR_TYPE accordingly, on a new statement handle; then executing
a "SELECT [..] FOR UPDATE"

ODBC SELECT Timeout

Hello,

I have a very large, long running query that is being run on a CentOS 6
Linux box from an application using unixODBC 2.2.14 and postgresql-odbc 8.4.
The target database is a postgreSQL 8.4 DB on another CentOS 6 Linux box.

When run, the query runs for about one hour and then dies with the following
error:

for SQL input object "SQL-AR": SQLNumResultCols: -1/1; S1000/[unixODBC]No
query has been executed with that handle

I'm no overly familiar with using ODBC and have been researching this as
best as I can.

ODBC does not handle WITH clause

It seems the ODBC driver does not deal well with a WITH clause in a
statement:

8<----------------------------------
SQL> select id from generate_series(1,2) as t(id)
+------------+
| id |
+------------+
| 1 |
| 2 |
+------------+
SQLRowCount returns -1
2 rows fetched
SQL> select w.id from (select id from generate_series(1,2) as t(id)) as w
+------------+
| id |
+------------+
| 1 |
| 2 |
+------------+
SQLRowCount returns -1
2 rows fetched
SQL> with w as (select id from generate_series(1,2) as t(id)) select
w.id from w
SQLRowCount returns 0

psqlODBC (32-bit) compiled with PostgreSQL 9.2 requires Microsoft Visual C++ 2010 Redistributable Package (x86)

I just tried installing the latest psqlODBC 32-bit drivers compiled from
source on a new Windows 7 64-bit Machine using the psqlODBC 32-bit drivers.
The install went fine, but when trying to configure a System DSN I got the
message "The program can't start because MSVCR100.dll is missing from your
computer.

ODBC constructs

Hello,

Can you please let me know any mapping document which maps ODBC constructs
between sybase and postgres.

Also list of ODBC constructs to be used with postgres.

Thanks in advance!

Regards...

Compiling psqlODBC on Windows with MS VC++ 2005 Express

With the latest psqlODBC 09.02.0100 prep, I have to make one change to
compile using MS VC++ 2005 Express (32-bit version of drivers):

In psqlodbc.h (my addition in bold)

/* File: psqlodbc.h
*
* Description: This file contains defines and declarations that are
related to
* the entire driver.
*
* Comments: See "readme.txt" for copyright and license information.
*/

#ifndef __PSQLODBC_H__
#define __PSQLODBC_H__

/* #define __MS_REPORTS_ANSI_CHAR__ */

#ifndef WIN32
#include "config.h"
#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
*#if (_MSC_VER == 1400) /* in case of VC+

Postgres ODBC blank date

Currently when we put a blank date into a date/time field in postgres, we get a "Invalid data/time syntax" error.
Can you put a patch for the ODBC driver to convert the blank date to null?

(Other ODBC drivers we are doing do this and a previous ODBC drive 7.3.260 did support this?

Any way to add this to current version?

Thanks
Barry Bell, IT Department
Office: 954-429-3771 x267 Fax: 954-281-1464 email Barry_Bell@harte-hanks.com<mailto:Barry_Bell@harte-hanks.com>

ODBC Blank Date convert to null

Does anyone know of an setting in the ODBC driver that will convert a blank date to a null?

Thanks
Barry

Vote Release number of the next.

Hi.

I think the vote of the next release number.

1.) 09.01.0300
many patch is a bug-fix support. and, psqlODBC is not intended
to be synchronized with postgres version number.

2.) 09.02.0100
new version is desirable because test code that contains.

3.) 09.03.0100
we want to have a postgres release the next number.

==
I vote to 1.) , I think the major version up, when there is a
change of more features and desirable.
thanks!

Regards,
Hiroshi Saito

Problem with special characters in password when using SQLDriverConnect

Hello,
 
if you use SQLDriverConnect instead of SQLConnect the connection fails on special characters like ';', '(', ')' and '+'(?) within the password.
 
According to the documentation ( <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms715433%28v=vs.85%29.aspx" title="http://msdn.microsoft.com/en-us/library/windows/desktop/ms715433%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ms715433%28v=vs....</a> ) []{}(),;?*=!@  are special characters.
 
In order to pass the connection string to the driver intact you have to bracket the whole connection string ( or just the values ?

psqlODBC 09.01.0100 Unicode version still crashes on long server messages?

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello,</div>

<div>&nbsp;</div>

<div>it seems when using the Unicode version of the driver it crashes when:
<pre class="bz_comment_text" id="comment_text_80" style="word-wrap: break-word;">log_statement = &#39;all&#39;

client_min_messages &lt; notice</pre>
</div>

<div>and a long query ( e.g. create function ) is sent to the server.</div>

<div>&nbsp;</div>

<div>Did not test it with a long erronous query sent to the server without using the settings above.

Issue with Oracle Database Gateway for ODBC and Unicode

Hello,

I hope this is the right mailing list to post questions about pgsql odbc.
I am sorry if I made a mistake and it is not.

I have a Postgres database (9.1) and an Oracle database (10.2) whose
character set is utf8. I installed the 64-bit 9.1 unicode psqlodbc driver
along with the Oracle Database Gateway for ODBC (DG4ODBC), version 11.2
because I have the need to access data in the Postgres database from the
Oracle one.

It works fine, but we have noticed the following.

Are UseDeclareFetch and UseServerSidePrepare mutually exclusive?

I've seen conflicting information on this:
<a href="http://postgresql.1045698.n5.nabble.com/Improve-ODBC-Throughput-tp2189601p2189614.html" title="http://postgresql.1045698.n5.nabble.com/Improve-ODBC-Throughput-tp2189601p2189614.html">http://postgresql.1045698.n5.nabble.com/Improve-ODBC-Throughput-tp218960...</a>
<http://postgresql.1045698.n5.nabble.com/Improve-ODBC-Throughput-tp2189601p2189614.html>

What I see with the latest source tree in my test environment of two windows
workstations, each using the latest compiled odbc drivers (09.01.02??) to
connect to PostgreSQL 9.2.4 (Windows):

1. With UserDeclareFetch=1 and UseServerSidePrepare=0, works as it always
has for me.
2. With UserDeclareFetch=0 and UseServerSidePrepare=1, works as it always
has for me.
3.

Time for a 9.3 release?

If everything goes to the plan, PostgreSQL 9.3 beta will be released in
the new few weeks, and I just saw a thread on the pgsql-jdbc list on
releasing a 9.3 JDBC driver for the beta
(<a href="http://www.postgresql.org/message-id/1367433610.6768.15.camel@lenovo01-laptop03.gunduz.org" title="http://www.postgresql.org/message-id/1367433610.6768.15.camel@lenovo01-laptop03.gunduz.org">http://www.postgresql.org/message-id/1367433610.6768.15.camel@lenovo01-l...</a>).

I think we should also make a 9.3 release of the ODBC driver. There's
been a lot of bug fixes since the last release, so it's time to make a
new release anyway.

- Heikki

Regression tests added

I cleaned up and pushed the regression test suite that I wrote a while
back. Two of the test cases are currently failing because of the bug
discussed here:
<a href="http://www.postgresql.org/message-id/51479445. ... at vmware dot com" title="http://www.postgresql.org/message-id/51479445. ... at vmware dot com">http://www.postgresql.org/message-id/51479445. ... at vmware dot com</a>. Once
that's fixed, let's keep it green!

I tried to write a nmake makefile for running the tests on Windows, but
failed. If someone who has more experience with Windows has the time to
do that, that would be great, but a Unix-only suite is already better
than nothing.

- Heikki

psqlODBC website face-lift

The psqlODBC website, at psqlodbc.projects.pgfoundry.org, is a bit
outdated. It's missing links to the new git repository (it didn't have a
link to the old CVS repo either), the pgfoundry page, and the downloads.
Also, it doesn't look modern.

I created a little mock-up of what the site would look like using the
main PostgreSQL web site's style:

<a href="http://psqlodbc.mooo.com/" title="http://psqlodbc.mooo.com/">http://psqlodbc.mooo.com/</a>

(that domain is just a temporary address for showcasing this - I'm not
proposing that we change hosting)

The sub-pages, like the howtos and faq, are unchanged.

UseDeclareFetch=1, Fetch=100, UseServerSidePrepare=0 causes Windows gpf in Unicode Driver versions > 08.04.0200

I've been upgrading some Windows servers from PostgreSQL 8.3.18 to 9.2.4.
Along with that I upgraded psqlODBC for the Windows clients from 8.0x.xxxx
to 09.01.0200.

All was fine until I had a customer who could consistently get a gpf in
psqlodbc35w.dll when doing an export.

Getting a copy of their database, I could reproduce as well.

Trying different driver versions, I've found no crashes with the 8.0x
psqlODBC series, but I can reproduce the gpf starting with 09.00.xxxx
through the latest 9.01.02??

UseServerSidePrepare default

The docs on ODBC configuration options recommend UseServerSidePrepare=1
for server versions 7.4 and above. That's a good recommendation. Given
that "7.4 and above" covers all supported versions of PostreSQL, and
every reasonable version people might want to use a new driver with, how
about we make UseServerSidePrepare=1 the default, so that people don't
need to set it manually?

- Heikki

Mixing 32/64 bit...

I'm experimenting with 64 bit windows environment, and before hitting
too much the head on the wall, for 32 bit application i have to install
the 32 bit version odbc drivers and use the 32 bit version of control
panel application to create DSN, right?

There's no trouble at all at mixing 32/64 bit postgres odbc driver,
right?

Thanks.

Git migration

I finally got a copy of the CVS repository (thanks Marc Fournier!), and
got to try the git migration using cvs2git.

Questions about building psqlODBC on Linux/Windows

Hello,

Please let me ask a few questions about building psqlODBC on Linux and
Windows.

Q1: What differences in functionality are there between the driver with
libpq and the one without libpq? Which has richer functionality?

Q2: Do I have to specify PG_INC and PG_LIB to build the ODBC driver on
Windows with nmake even when LIBPQ=no?

Q3: When should I use the ANSI driver? I'm not very sure even after reading
the FAQ.

Regression in psqlodbc 9.1.2 in SQLRowCount()

Hello.

Our code does a bunch of selects, inserts and updates, including an
insert within a transaction that looks like:

insert into foo values (?, ?, ?, ?, ?, ?, ?, ?)

where the parameters are integers, strings and timestamps.

Regression with no results returned from query between 9.01.01 and 9.01.02

Hello,

Our code doing some relatively simple SELECT queries has stopped working
after upgrading from 9.01.01 to 9.01.02. After some debugging and bisecting
I found that:

1. The original bug was introduced by a seemingly nonsensical change to
the SC_forget_unnamed() macro in statement.h in
<a href="https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84a0610562c2a4" title="https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84a0610562c2a4">https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84...</a>

2.

Regression with no results returned from query between 9.01.01 and 9.01.02

Hello,

Our code doing some relatively simple SELECT queries has stopped working
after upgrading from 9.01.01 to 9.01.02. After some debugging and bisecting
I found that:

1. The original bug was introduced by a seemingly nonsensical change to
the SC_forget_unnamed() macro in statement.h in
<a href="https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84a0610562c2a4" title="https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84a0610562c2a4">https://github.com/hlinnaka/psqlodbc/commit/5f35a04c498c4af02a3d2ac4cd84...</a>

2.

Issue with ALTER Table.

The Catalog Schema seems not to be actualized when using ALTER Table.

I had reported a problem with adding NEW tables, which was corrected by
Hiroshi

<a href="http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schema-cache-not-being-updated-completely-tt4372956.html" title="http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schema-cache-not-being-updated-completely-tt4372956.html">http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schema-cache-not-...</a>

<a href="http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Catalog-Info-tt4598955.html" title="http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Catalog-Info-tt4598955.html">http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Catalog-Info-tt...</a>

When "altering" a Datatype of column the problem still exists:
Say, we have a column which is defined as varchar(40)
Now we want to double the field length to varchar(80)

ALTER TABLE customer
ALTER COLUMN address TYPE varchar(80),

Whe

Can I have commit access, please?

Hi everyone,

I've submitted a bunch of bug fixes in the last couple of months, but
gotten no response. I guess that means that all the committers are busy.

Can I please have commit rights to the repository, so that I can go
ahead and commit the fixes myself? I probably will submit more fixes in
the future, too.

Also, anyone have an opinion on migrating to git?
(<a href="http://www.postgresql.org/message-id/514327A0. ... at vmware dot com" title="http://www.postgresql.org/message-id/514327A0. ... at vmware dot com">http://www.postgresql.org/message-id/514327A0. ... at vmware dot com</a>). If
no-one objects to that plan, I can do the grunt work for that too.

- Heikki

SQLExecute returns 0 rows with BoolsAsChar=1

If you SQLPrepare a query, and bind a VARCHAR parameter with column_size
of exactly 5, and you have BoolsAsChar=1 (which is the default), the
subsequent SQLExecute will return 0 rows.

With those conditions, HowToPrepareBeforeExec returns shouldExec, which
means that the query is sent to the server to be parse, in a Parse
message. PGAPI_Execute() calls HowToPrepareBeforeExec, and calls
prepareParameters(), which sends the Parse message, and reads the
resulting ParameterDescription messages from the server.

Bug: attributes dynamically filled (e.g. xml) truncated

Hi,

I have found what I think might be a bug. I am using the ODBC driver
in conjunction with AnySQL. After submitting this bug report to them,
they said they think that it is a problem with the driver, because “it
just displays values returned by the driver.” So here we go! :-)

The text type in PostgreSQL is of unlimited length.

Avoid O(n^2) behavior with large parameter arrays

While digging deeper into the array binding code, I noticed that a lot
of time is spent chasing the end of the linked list of query result, to
append a new result at the end. When executing a statement with array
binding, SC_execute iterates through all the previous results, leading
to O(n^2) behavior. With a large parameter array, a lot of CPU time is
spent doing that.

Attached patch fixes that by keeping track of the tail of the linked
list, and the StatementClass that "owns" each QResultClass object (if
any).

Migrating from CVS to git

Hi,

How about migrating the psqlodbc project from CVS to Git? psqlodbc is
one of the last (the last?) projects that I regularly work with that
uses CVS, and it's quite painful.

As you might've noticed from my recent postings, I did a CVS->git
conversion at github, to make my life easier. We could use that as the
basis of the repository, and just copy it to git.postgresql.org. Or we
could redo the conversion. "git cvsimport" seemed to work fine on the
psqlodbc CVS repository.

Thoughts? Would this affect the way the release tarballs are built?

- Heikki

Memory leak with SQLNumResultCols

If you call SQLNumResultCols() on a non-SELECT statement, e.g. INSERT
RETURNING, it leaks memory.

The root cause is that QR_Constructor() gets called multiple times due
to multiple-evaluation of macro arguments.

QR_Destructor should iterate, not recurse, chained result sets

QR_Destructor() calls QR_close_result(), which free's all the resources
associated with the result set. It also calls QR_Destructor() on the
next result set in the chain. In other words, when you call
QR_Destructor() on the first result, it recurses to free all the chained
results.

That recursion is a problem. A chained result set occurs at least if you
use array binding; there is one chained result for each element in the
parameter array.

speeding up inserts by pipelining

I'm trying to populate a large temporary table (a few million rows), and
running into performance woes. In my initial tests, inserting 100,000 rows
took 2.5 minutes, which I managed to get down to 1 minute by (a) using an
insert buffer, i.e. using SQL_ATTR_PARAMSET_SIZE with SQLExecute, and (b)
turning on the "Server Side Prepare" option.

FW: Reverse Engr into erwin

Repost from pgsql-general.

Thanks in advance for thinking about my problem.

As I suspect you know, CA Erwin doesn't support Postgres or greenplum.
But they do support ODBC for reverse engineering.

When I reverse, Erwin executes the standard ODBC metadata queries for the system catalog.
The process works fine, but I'm finding that the datatype that's returned is the internal PG type instead of the standard set of ANSI types.
Eg, a BIGINT col

bug in sqlGetInfo on Linux i386 platform

Hi,
 
sqlGetInfo on SQL_DBMS_VER returns different string when I have the protocol setting in the odbc.ini file
 
1)  Here is the odbc.ini file that has entry Protocol which is set to 7.2, or 6.4.  The SQM_DBMS_VER string contains some other info.
[GOSALES1_PG_92]
Driver=/usr/pgsql-9.1/lib/psqlodbc.so
Description=Sample PostgreSQL DSN
Servername=vottdts26
Database=gosales1
Username=gosales1
Password=gosales1
Servertype=postgres
Port=5432
Protocol = 7.2
 drv-mob:/uda/dev/nguyens/postgres> ./a.out
SQL_DBMS_NAME = PostgreSQL, StringLengthPtr = 10
SQL_DBMS_VER = PostgreSQL 9.2.1, compiled by Visu

ODBC blank date.time setting

I am accessing Postgres from a lnageuage that supports blank dates ( vardatetime={} is a valid date in foxpro).
Postgres will produce an error with we try to insert a blank date into a timestamp.
(Getting the error: )

Is there any ODBC setting that will convert the blank date (vardatetime={} ) to a null value?
(Inserting null values into a timestamp works).

This language supports "views" for updated, used by the framework of our application,

Anyone have any idea if there ODBC setting to turn to blank date to null?

Thanks
Barry Bell, IT Department

SQL_ATTR_QUERY_TIMEOUT not supported

Hi folks !

Is it true that PostgreSQL ignores this statement specific attribute
?

Do I have to set the session wide statement timeout before each
execetion of a statement/query to the value I prefer ?

Thanks in advance.

Regards

Johann

EN_Destructor bug

Hello!

1) We observe crashes in psqlodbc.so library from time to time.

SQL_CONCUR_LOCK not supported ?

Hi again !

I am sorry that I have to bother you all with my porting problems
again.

In our backend we create special cursors for row locks like this
(works fine with MSSQL):

SQLAllocStmt(); // Create the cursor

SQLSetStmtAttr(SQL_ATTR_MAX_ROWS, 1); // The lock cursor only
delivers one row

SQLSetStmtAttr(SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY);

SQLSetStmtAttr(SQL_ATTR_CONCURRENCY, SQL_CONCUR_LOCK); // Lock mode
that other cursor of this type will fail

// !!! Postgres changes this to SQL_CONCUR_ROWVER with "01S02
Requested value changed" !!!

Error connecting psqlODBC to PostgreSQL

Hi,

We compiled psqlODBC-09.01.0200 on WIndows (32bit/64bit). We have
PostgreSQL 9.2 installed and we see that when we add user DSN and test the
connection, it throws error. "Could not connect to the server; Could not
connect to remote socket immediately."

The psqlODBC-09.01.0100 works fine with PostgreSQL 9.2.

I have attached the logs for your reference. Thanks

Bug in SQLRowCount ?

Hello !

I maintain a backend in a commercial context. The backend provides
access to MS SQLServer (via ODBC) and Oracle (via OCI). Now I want to
make it ready for PostgreSQL via ODBC.

For performance reasons we use bulk inserts/updates.

This is done in this manner:

SQLAllocStmt

SQLPrepare // insert into kfztest.KP values (?,?,...,?)

SQBindParameter // for each column

...

Source code cleanup

I'm getting a bunch of compiler warnings when I compile the latest
psqlodbc sources from CVS. I spent some time cleaning those up.

I also got access to a report of a Coverity scan over psqlodbc source
tree. That found a bunch of additional issues, some of which were
genuine (minor) bugs. I'm still in the process of going through the
report, but I fixed some bugs already.

I also wrote a small regression test suite to test with. It only tests a
few of the ODBC functions at the moment, but it's better than nothing,
and it can be easily extended.

Connection dialog behavior of ODBC driver psqlODBC 9.01.0200 vs 8.x on Win XP

I have an MS Access app which connects to a PostgreSQL back end. I
recently migrated the back end to PostgreSQL 9.x and upgraded the drivers
on the Access client machine (Windows XP) from 8.x to 9.01.02.

The app uses linked tables with no password saved in the link. Under the
old driver, the connection/password dialog would be displayed automatically
when the user attempted to access a linked file. Under the new driver the
connection fails without displaying the dialog. The tables are accessible
only if the user uses the linked table manager to re-establish the
connections.

Very slow perfomance for selecting big data resultsets.

Hello.

I have a big data table. This table consist of 30 columns and 1000000
rows. I want to understand why the select of 100000 records in the
psqlODBC performed 60 seconds. When i do this with mySql ODBC this
operation perfomed 13 seconds. Are there any recommendations to speed
draver? Maybe have binary mode or any more settings?

Please help

problem after build libiodbc-3.52.8 and psqlodbc-09.01.0200

i try to use ODBC in centos 6.3 x64 and postgresql 9.1.3 .
as soon as I remember ,odbc.ini and odbcinst.ini are created when I use
unixodbc .
how ever when I follow these steps :
----ibiodbc-3.52.8.tar.gz
./configure --with-libpq=/usr/pgsql-9.1/bin/pg_config --enable-pthreads
--with-iodbc=/usr/local/bin/iodbc- config --sysconfdir=/etc
Make
Make install
----psqlodbc-09.01.0200.tar.gz
./configure --with-libpq=/usr/pgsql-9.1/bin/pg_config --with-iodbc
Make
Make install

I think these packages installed properly, however two files (iodbc.ini and
odbcinst.ini) is not created.
Is it norm

Windows 2012 64bit ODBC Administrator crashes

Bugs item #1011246, was opened at 2012-10-11 16:15
You can respond by visiting:
<a href="http://pgfoundry.org/tracker/?func=detail&amp;atid=538&amp;aid=1011246&amp;group_id=1000125" title="http://pgfoundry.org/tracker/?func=detail&amp;atid=538&amp;aid=1011246&amp;group_id=1000125">http://pgfoundry.org/tracker/?func=detail&amp;atid=538&amp;aid=1011246&amp;group_id=...</a>
Or by replying to this e-mail entering your response between the following markers:
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
(enter your response here)
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+

Status: Open
Priority: 3
Submitted By: Edwin Grubbs (egrubbs)
Assigned to: Nobody (None)
Summary: Windows 2012 64bit ODBC Administrator crashes
Category: None
Group: None
Resolution: None
Category: None
Group: None
Resolution: None

Initial Comment:
I ha

Empty bytea values on 9.2.1

Hi!

On an 8.4 installation, I have a table with a bytea column. In some rows, the
value of this column has length 0. When I query that table with a normal SELECT,
using the ODBC driver from C#, I get a byte[] object of length 0 on those rows.

So far so good.

Now, I dumped the database and restored it on a 9.2.1 installation. The tables
look the same on the new installation: Zero length of the bytea values in some
columns.

PostgreSQL driver not visible in windows control panel

One of the employees here is having trouble connecting to a postgreSQL server, so while looking for the problem I opened Windows 7 control panel > administrative tools > Data Sources (ODBC) >Drivers (tab) and there are no postgreSQL drivers listed.

This employee can successfully connect to a different postgreSQL server on a different web server, so I was startled to see no drivers.

How is this possible? Is windows hiding the drivers for some reason?

Windows 2012 64bit ODBC Administrator crashes

When I try to create a DSN with either PostgreSQL ANSI(x64) or
PostgreSQL Unicode(x64) and click the "Finish" button, I get the error
message "ODBC Administrator has stopped working". If I click on the
"Debug" button, I get the error message "An unhandled Win32 exception
occurred in odbcad32.exe" with a random error code. I have verified
that I am running the correct ODBC Administrator, since both the
32-bit and 64-bit binaries are called odbcad32.exe but are in
different directories.

UUID returned as SQL_VARCHAR instead of SQL_GUID, contains no data

I tried reporting this bug once before, but I hadn't subscribed to the pgsql-odbc list at that time and I think my emails must be permanently stuck in a spam filter limbo.

Summary:
When selecting a UUID column, it is reported as a SQL_VARCHAR. Binding the column and fetching never retrieves any data for the column.

Versions affected:
x64 ANSI on Windows, at least since 9.01.0100, but possibly before. Does not affect the Unicode or x86 version.

Details:
I'm using ODBC directly from C++ code.

Application Name

Thanks Jon,

My interest is doing it via an ODBC connection where I can specify different parts of an application for debugging purposes.

George

The application name is actually set using a SQL statement:

set application_name = 'My Application'

I believe this has been possible since Postgres 8.5

Jon

<a href="mailto:pgsql-odbc- ... at postgresql dot org">pgsql-odbc- ... at postgresql dot org</a> wrote on 09/24/2012 03:15:04 PM:

Application Name

Hi,

I don't see the option to specify application name in the list at <a href="http://psqlodbc.projects.postgresql.org/config-opt.html" title="http://psqlodbc.projects.postgresql.org/config-opt.html">http://psqlodbc.projects.postgresql.org/config-opt.html</a>.

Is this something that will eventually be possible?

Thanks,
George

ODBC 64bit + SSL

Hello,

I’m unable to make a connection using 64bit ODBC driver together with SSL.

When I turn off SSL it works fine using 64bit version.

When I use 32 bit ODBC with SSL it works fine as well.

The problem is only when using 64bit version + SSL.

Could you, please, be so kind to assist me with this problem.

Many thanks in advance for your help.

Best regards

Petr Patera

Error reporting goes into an infinite loop when compiled --with-odbcver=0x0250

Hi,

we had to recently test psqlODBC with an older application
which doesn't expect ODBC 3.x.

The problem is that the client locks up as soon as it encounters
an error of any kind, like restarting the server from under the client
or simply executing a bad query.

After debugging the problem and reading the code of both
unixODBC 2.3.1 and psqlODBC (version 09.00.0310 and 09.01.0200),
I discovered that the DriverManager calls the driver's SQLError()
and SQLGetDiagRec() in a loop and expects it to return the error
message in pieces and when there is nothing left to return,
these driver methods

psqlODBC 09.01.0200 Released

We are pleased to announce the release of psqlODBC 09.01.0200. For
details of the changes in this release, please see the notes at:
<a href="http://psqlodbc.projects.postgresql.org/release.html" title="http://psqlodbc.projects.postgresql.org/release.html">http://psqlodbc.projects.postgresql.org/release.html</a>

With this release two versions of the driver are provided for Windows;
'PostgreSQL ANSI' which supports single and multibyte applications
through the ANSI ODBC API, and 'PostgreSQL Unicode' which provides
Unicode support through the Unicode ODBC API.

GSSAPI Authentication Problem

Hi,

I would like to report what seems like a problem with the driver. It
doesn't seem possible to override the default user name for
authentication by GSSAPI. I'm using a map in pg_ident.conf since my
Active Directory user name isn't the same as my Postgresql user name.
pgAdmin III and psql allow for this, the former by setting Username in
the GUI to my Postgresql user name and the latter by specifying the -U
option.

Problem with ODBC-Driver on a Windows 7/x 64

Hello,

we have some obscure problems accessing the database via ODBC driver
PostgreSQL Unicode on Windows 7/x64
While accessing a table, i get the error *invalid UTF-8 byte sequence
detected near byte 0xfc*
On two Windows 7/x64 clients accessing the same table is working fine. O
two other Windows 7/x64 clients i get this error.

Regarding PostgreSQL BIT datatype binding in ODBC.......

Hello All,

I am new to this mailing list and this is my first post :)

I want to pass numeric data (2345) into a PostgreSQL BIT datatype column bit(1) using dynamic sql thru ODBC. I very much understand the risk of data getting truncated...
On PSQL, I simply can do -- insert into tab values(CAST(2345 AS BIT(1))) to acheive what i want (and I understand only 1 would get inserted). But I want to do this through ODBC and dynamic sql.

I will have to prepare my query as 

insert into tab values(CAST(?

question re org.postgresql.util.PSQLException

The following query works in pgAdmin query tool but not when run within a java pgm. Don't see any postings with inet as the culprit type for the error. And yes the OR subclause is redundant. Didn't catch it till reviewing the error.

Anyone see anything like this and what the cause is? I have the same statement (no OR clause) working with C# and both the postgres and default ODBC drivers. Not sure which driver my colleague was using but presume Postgres from the error msg. Changed values to protect the guilty.

ByteA column retrieved in 31 minutes ...

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi, <br>
I'm using a 9.0.2 db in a PowerBuilder 12.1 application, connecting
to it via ODBC driver 09.00.0200.<br>
<br>
I have a table with a bytea column:<br>
<br>
<tt>CREATE TABLE docs<br>
(<br>
  blobid character(7) NOT NULL,<br>
  descript character varying(40),<br>
  data date,<br>
  "lock" character(1),<br>
  ora character(5),<br>
  parita character(1),

Syndicate content