Windows setup


I'm sorry to bother your for a simple question, but I think it will help a
lot of people and I will do my best to share it with Medical school
librarians and others who will find it very useful. is the repository where the US stores information on
clinical trials. It's a great resource for medical researches and the

They have a method (database version in postgreSQL) to access the data

PostgreSQL on OSX

I just purchased a brand new Apple laptop which has High Sierra
pre-installed and I
tried to install PostgreSQL on it.
I downloaded version 10.5 from the PostgreSQL web site , but trying to
run the installer, I got:

PostgreSQL is not optimized for your Mac.
This app needs to be updated by its developer to improve compatibility.

The installer starts nevertheless and will probably finish, but I'm
just curious if everything will work properly? Or even better question
- when there will be a version compatible with High Sierra?

Thank you.

UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'


First of all, thank you for your attention.

I have the following packages installed in my Linux OS Centos


I already have a PostgreSQL ODBC connection configured and functional, but
when trying to create the new connection below and use the Isql utility to
perform a test I am getting the error below, I did not find much about it,
would you like to know how to proceed in this case?

*follows the odbc.ini conf:*

Description = Banco de dados BH

I can not find complete documentation pages from PostgreSQL ODBC Homepage


I tried to find some documentation on configuring psql-ODBC.

And I found that there is no link to all doc pages, for example,
<a href="" title=""></a> can not be opened directly
from the homepage.

Can someone please add hyperlink to all doc pages?

Thanks a lot.

Issue with ODBC connection when export Database


I am trying to export my DB that was on SQL 2008 to 2017 SQL server & I
succeeded, and I am trying to connect the exported database into odoo(Ver
11) by making link server to PostgreSQL.

ODBC Driver - MS SQL 2014 Compatible


We need an ODBC driver that is compatible with our MS SQL data warehouse in order to import activity data from our Radiology system.

We have set up an SSIS package that runs fine in de-bug mode with the SQL server setting as MS SQL Server 2016 but when we change this or attempt to run it as a job it fails to bring in the full datasets with no error message.

I have tried to determine the version of the driver that installed on the server but cannot see a readme file or any about information in the ODBC manager.

Please can you recommend a version (and where we can download it) that we can

Crash in CC_from_PGresult

Our customers are crashing on Windows in CC_from_PGresult up to version 10.2.0 of the 64-bit driver. Do you know if this crash is fixed in a later version? Or what can I do to help get it fixed?

The call stack in 10.2.0 is:


Getting an error for unixODBC library "odbcinst" not found while executing ./configure --with-unixodbc=/usr --with-libpq=/apps/PostgreSQL/10 in SuSE Linux 12.0 SP1


I am trying to install PostgreSQL ODBC drivers in SuSE Linux 12.0 SP1 where
I am getting following error:
configure: error: unixODBC library "odbcinst" not found

I am able to see below libraries though under usr/lib64 ->

I did set the LD_LIBRARY_PATH to /usr/lib64 and set LDFLAGS=-ldl too.
However while executing below command I am getting an error:
./configure --with-unixodbc=/usr --with-libpq=/apps/PostgreSQL/10/data

I have tried to change --with-unixodbc multiple times but getting same

ODBC - Getting CONN ERROR: errmsg='The buffer was too small for the InfoValue'"

I've ported a powerbuilder application to postgresql. Tested ok on windows
10 64, was installed on two win10-64 other computers, all connecting the
postgresql database in the localhost with access via odbc. The third of
them presented the error detailed below in the logs (mylog and psqlodbc)
integrally copy and paste.
Can anyone help me?

- The application send the connect command and receive error "IM001"as a
- The ODBC DSN interface test shows "connection successful".
- The log tell us that the connection to the database was effectively
completed by the driver.

psqlodbc Windows Server 2016

Dear PG-Team,

one Question: Which Version of psqlodbc_*.zip (<a href="" title=""></a>) is compatible with Windows Server 2016?

Thanks for your answer!

Mit freundlichen Grüßen
Christian Haunsberger
Anwendungsentwicklung BAU/ÖSI

ODBC cliens is hanging if network connection is broken

Hello PostgreSQL Community!

I downloaded and installed the latest version of PostgreSQL from
<a href="" title=""></a> on my SLES 12 system.
Here is my configuration of unixODBC:

Description=PostgreSQL ODBC driver

Description = PostgreSQL connection to rtpdb
Driver = PostgreSQL
Database = rtpdb
Servername = sles12-1
Username =
Password =
Port = 5432
Protocol = 7.4+
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ConnSettings =

As a Driver in odbcinst.ini I specified the p

Windows 10 password problem

Hi, I'm running Postgres 10.3 (linux) with pg_hba configured to require
password (md5). The ODBC 32bit connection is set up properly and test
connection button shows success. I've got an application using ODBC 10.03
drivers on Windows 10 which can not connect using this connection and the
error message is: authentication failed for user. Postgres logs the same
error message.

I've got it working fine in Windows 8.1 and below.
Did anyone encounter anything like that ?

Patch to support service parameter & german translation


attached three patches:


Adds support for the service parameter in connections
(see <a href="" title=""></a>)


Adds German UI. Also includes some dialog layout fixes for the U.S.


Add the service field to the japanese ui (please check
the label - translated using google).

Please review and if ok apply. Thanks.


Setting statement_timeout

Since 9.5 the Postgresql ODBC driver sets a default statement timeout.
According to Hiroshi the specific value (30 seconds) isn't set in the
driver but "from apps or middlewares". We have two applications which
issue queries which may take more than 30 seconds. One of which was
developed in house, so we can simply override the default in the
application (just issue "set statement_timeout = 299000" after
connecting), but the other one is commercial closed source software.

So my question is: Is there a way to change this setting globally (via
ODBC configuration, registry, whatever)?

Regarding life cycle information of psqlODBC


I would like to know the source for obtaining life cycle information of
different versions of psqlODBC.

Thank you

Saksham Rastogi

psqlodbc driver issue with Win10 Update 1803

After updating their PCs several of our customers have heavy difficulties to
connect to their postgresql servers.


Hello sir's
We want to run A VisiualBasic6 application connected with postgreSQL.
This application was running with Windows XP over many years.
Now the PC must be replaced by W7pro 64bit system.
I have installed postgreSQL 8.4 and psqlodbc_9_00_0310-x64 and later versions.
The W7 ODBC (32bit) datasource administrator does find : PostgreSql30 unicode(x64) source. Connection test ok.

RE: Bug report: x64 Row status Array uses wrong data type

I consider this closed as "bug in implementation by Oracle".

Thank you Clemens and Hiroshi for your time and effort!

Jari Siikarla

Re: NUMERIC type makes trouble in MS Access

Interesting detail: It's not an Access problem.

I've tested it with Python and Libre Office Base. NUMERIC without
precision gets set to 28,6 => like in Access.

Would it perhaps better to use MEMO instead of VARCHAR?
MEMO allows more than 8,000 chars in "Base" and some gigabytes in

But there's not enough space for an additional toggle switch :(

RE: NUMERIC type makes trouble in MS Access

Here an update:

by default, MS Access sets linked tables with "unlimited" NUMERIC
to DECIMAL with "precision: 28" and "decimals: 6" (MS Access names).
Trying to read a value [INSERT INTO public.demo VALUES (1.0 / 3)]
breaks with an error.

When creating the column using NUMERIC(28, 24), MS Access shows this:
"precision: 28" and "decimals: 24".

Re: NUMERIC type makes trouble in MS Access

Some additional information about supported functions and mappings:

<a href="" title=""></a>
<a href="" title=""></a>

Does PGSQL-ODBC map NUMERIC the same way (to SQL_NUMERIC)?

MS Access: still having problems with NUMERIC

Hi there,

three months ago I reported a problem when using the ODBC driver
version 10 or higher in connection with Access 2010 with field

Unfortunately I haven't received any feedback yet. Shall I ask
the question again?

Best regards,

psqlODBC 10.03.0000 Released

Hi, all.

We are pleased to annouce the release of psqlODBC 10.03.0000.
please see the notes at:
<a href="" title=""></a>

psqlODBC may be downloaded from in source, Windows Installer,
merge module, and basic zip file formats.

New Windows installer installs both 32-bit and 64-bit driver at once
on 64-bit OS.

high cpu on idle state

Sorry to bother if my question is irrelevant
but I really would like to understand why
idle persistent connection would take more than 25% of a cpu

top -c

63844 postgres  20   0 4677440 289168 287320 S  33.9  0.9   0:03.43
postgres: freeswitch freeswitch idle
62774 postgres  20   0 4677480 286488 284636 S  29.9  0.9   1:22.17
postgres: freeswitch freeswitch idle
 4901 postgres  20   0 4677480 280812 278968 S  27.6  0.9   2:43.71
postgres: freeswitch freeswitch idle
 4847 postgres  20   0 4677480 279468 277624 S  24.9  0.8   2:35.25



I noticed high cpu usage with idle connections using

psqlodbc last git version:

10793 postgres  20   0 4677484 329672 327772 S  29.2  1.0 2:21.43
postgres: freeswitch freeswitch idle
12708 postgres  20   0 4677508 323524 321652 S  27.6  1.0 0:49.71
postgres: freeswitch freeswitch idle
12725 postgres  20   0 4677508 329232 327360 R  24.9  1.0 0:52.27
postgres: freeswitch freeswitch SELECT

3 nodes are connected through VPN with tinc, freeswitch is a voip server
that establishes permanent connection.

any idea?

Fedora 26 64bits


32-bit odbc source compilation failed

We hope this message finds you well.
We are looking for a 32-bit compatible ODBC driver for RedHat Linux 7.4 64 -bit version for connecting 32-bit application to a 32- bit Data Source.
We downloaded the driver 'psqlodbc-10.02.0000.tar.gz' from the URL <a href=";umid=76FF58ED-6C26-0805-A753-765F80188BA7&amp;auth=ec34f7633709e8bd85e48c7fc0c92c09c079e558-e50cc6da79abab78c719160d67495dc9ce4fc6f9" title=";umid=76FF58ED-6C26-0805-A753-765F80188BA7&amp;auth=ec34f7633709e8bd85e48c7fc0c92c09c079e558-e50cc6da79abab78c719160d67495dc9ce4fc6f9"></a> released on 30-03-2018.

When we try to compile it,which failed with below error.

Build with Oracle Solaris Studio


the small patch attached makes psqlodbc buildable using Oracle Solaris
Studio (tested with version 12.3).


Bug report: x64 Row status Array uses wrong data type


Thank you for psq odbc driver!

I've found an issue with 64 bit driver.
The array returned from fetch for row statuses uses 16 bit values
instead of 64 bit values.

Tested on x64 Windows (7, 10, srv2012 and srv2016)
with 64 bit psqlodbc-09.06.0500 (Unicode and ANSI)
Client is set ODBC version 2

Changing SQLUSMALLINT to SQLSETPOSIROW in descriptor.h
for two structs and in the code handling these structs fixed the issue.
Code in psqlodbc-10.02.0000 is the same for these parts.

struct IRDFields_
StatementClass *stmt;

Problem with ODBC class

Hi, ALL,
Is there a reason why following function returns empty string?

SQLHSTMT stmt = 0;
SQLHDBC hdbc = 0;
int result = 0;
SQLLEN cbTableName = SQL_NTS, cbSchemaName = SQL_NTS;
SQLWCHAR *table_name = NULL, *schema_name = NULL, *qry = NULL;
std::wstring query;
if( pimpl->m_subtype == L"PostgreSQL" )
query = L"SELECT u.usename FROM pg_class c, pg_user u,
pg_namespace n WHERE n.oid = c.relnamespace AND u.usesysid =
c.relowner AND n.nspname = ?

ODBC 2.0 Bug: wrong timestamp data type


I used the latest driver version
If your application uses ODBC version 2.0. When you
call SQLGetTypeInfo, the driver reports supported data
types that are not available for version 2.0. The first
iteration of the result of this function for the timestamp
data type is SQL_TYPE_TIMESTAMP. If you then call
SQLBindParameter, ODBC Manager returns s1003 (SQL1).log).
The error could be corrected (SQL2.log).

bigint disparity between two installations

I have a database on PostgreSQL 9.3 that I am accessing using psqlodbc
version on a couple of different Windows machines.

I have some bigint fields that are truncated on only one of the machines.
I have called both of their odbc setups up and compared them screen by
screen a few times and they are setup the same.

A value that is stored in the database is: -40581311272
This value is read correctly on two of the machines, but is returned as
-405813112 on the third.

Registering DSN with odbcconf.exe overwrites the connection attributes with defaults

With the following command, the SSLmode of the DSN is defaults to disable,
even the "prefer" option is provided in the connection attributes.

odbcconf.exe /A {CONFIGDSN "PostgreSQL Unicode(x64)"

During the configDSN, first the connection attributes are parsed in
ParseAttributes function and later all the values are replaced with
defaults using getCiAllDefaults.

ODBC - psqlodbc-7.2.3


I am not sure when i compiler the source using make, it failed. it worked fine when in execute the configure command.

I can't use the latest release. it does not work for me on the Solaris 10.

root@m# ./configure

checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets ${MAKE}... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output...

Deadlock when executing multiple select statements from multiple threads


We are having a deadlock issue when executing multiple select statements from multiple threads, the issue happens with driver version ( or newer, doesn't happen on .
I've attached a simple project that triggers the deadlock, tested with visual studio 2017, release x64 build, PostgreSQL 10.3, usually happens after few runs.[please note that the proper database connection string and the table names need to be provided in the code for it to work].
I've also included the stack trace of the two threads in deadlock.


Re: [ANNOUNCE] psqlODBC 09.06.0500 Released


Vedi allegato e di confermare.

Grazie e a presto,


Sebastiano SchiaviDirettore Generaleseba. ... at sixs dot it SIxS - Soluzioni Informatiche per il SocialeVia Sant'Antonino 41 - Vaiano Cremasco (CR)Tel.0373 386177 – Fax 0373 380216Cell. Informativa privacy: Le informazioni contenute nella presente comunicazione e i relativi allegati possono essere riservati e sono comunque destinati esclusivamente alle persone o alla Società sopraindicati e non sono da considerarsi comunicazioni personali.

SSL connection string documentation

Example of pqopt on 3rd screen: sslroot=c:\\root.crt
Example of pappy in connection string:
Could you please post drove me crazy trying to figure it out.

psqlODBC 10.02.0000 Released

Hi, all.

We are pleased to annouce the release of psqlODBC 10.02.0000.
please see the notes at:
<a href="" title=""></a>

psqlODBC may be downloaded from in source, Windows Installer,
merge module, and basic zip file formats.

New Windows installer installs both 32-bit and 64-bit driver at once
on 64-bit OS.

Postgres Foreign Data Wrapper and DB2 LUW

Is there a web page describing how to set up a PG FDW to talk to DB2 LUW ver 10.5 ?


Compilation fails with XLC in AIX


I am compiling PostgreSQL ODBC driver 10.01.0000 in AIX using XLC compiler.
Compilation fails with the following error.

ld: 0711-317 ERROR: Undefined symbol: .getExeName
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
Makefile:573: recipe for target '' failed
gmake[1]: *** [] Error 8
gmake[1]: Leaving directory
Makefile:479: recipe for target 'all' failed
gmake: *** [all] Error 2

getExeName is no more there after this commit "Move the implemetation of
GetExeName() from psqlodbc.c(psq

Lost Data Connection

I have been successfully using the following PostgreSQL connection string in multiple Excel 2010 vba applications running on 64 bit Windows 7 systems. I have moved to a Window 10 system and my application will randomly lose its connection to the DSN. It may take 5000 calls one time and then 400 calls the next. I am using a Unicode driver. I wrote a sample program that makes the same call in a loop. The code will randomly fail on Window 10 and run flawlessly on Window 7.

ODBC embedded Postgres


We have an embedded Postgres database installed along with Vcenter Vmware
app. We wanted to connect it with ODBC connection, Is it possible? If yes,
what version of ODBC i need to install and are there any changes we will
need to make on Postgres SQL side?


Hello, psqlODBC team.

When we fetch large data via psqlodbc, we sometimes fail to
get all rows completely without any API's error responses;
SQLExecDirect returns SQL_SUCCESS and SQLFetch returns just SQL_NODATA.
But there are QR_REALLOC_error reported in mylog at that time.

I reproduced it by tweaking QR_REALLOC_return_with_error macro
to intentionally fail to allocate memory frequently.

DBLink problem between Oracle and PostGreSQL

Dear all,

I'm not sure if it is the correct address to send this king of request,
but we are currently struggling with a problem between Oracle and
PostGreSQL, passing through ODBC, so I take my change.
The situation is the following:
. On Oracle side:
 - Windows Server 2012 R2
 - Oracle 11g r2 (

. On PostGreSQL:
 - PostgreSQL 9.4.13
 - No details on servers or configuration, we don't have access to this.

. ODBC PostGreSQL Drivers

=> The problem is the following:
. We are currently unable to use a DBLink from Oracle to PostGreSQL, via

help with downloading postgres server and client

I downloaded downloaded installer from this site (
<a href="" title=""></a>) but this is not what I want
or it came with a whole bunch of other plugging that I don't need. All I
need a server and pgadmin. I also tried to download the binary files but I
have no luck.

could you please point me the right direction?

SQLError SqlState wrong when postgres backend dies


The SQLError function is returning the last statement level SqlState value if called after the postgres backend dies.

For exampel, if prior to the death of the postgres backend the last SQL statement that had an error returned an SqlState="23505"(due to a unique index problem) then after the postgres backend dies the next SQL statement will fail and SQLError returns:-

NativeError=26 SqlState="23505" ErrorMsg=Could not send Query(connection dead)

So ErrorMsg is correct but SqlState is not.

I was using psqlodbc-09.05.0400 but repeated my test with 10.01.0000 and got the same result.

PostgreSQL) How to use Bind Variable with ODBC Driver V10?


I hope my email finds you well. 

I am developing query tool for PostgreSQL using ODBC Driver (recent release ODBC v10).

The product that I am developing uses the SQLDescribeParam() function before the query SQLExec() when using Bind Variable. 

SQLDescribeParam () function normally works on 'psqlodbc_09_06_0500-x86', when using Bind Variable. 

However, in 'psqlodbc_10_00_0000-x86' and later versions, error occurs and Bind Variable cannot be used. 

Normal queries that do not use the SQLDescribeParam () function work fine. 

For your reference, below is the example of the query that

NUMERIC type makes trouble in MS Access

Hi there,

I'm experiencing problems with the ODBC driver on Windows 7 (and 10)
on 32 and 64 bit in Microsoft Access 2003, 2010 and 2016 (32, 64 bit).

My PostgreSQL server runs on Debian (64-bit): 9.6.7-1.pgdg80+1
Tested ODBC drivers: psqlodbc_09_06_0500 & psqlodbc_10_01_0000

Summary of the problem:
The current behavior of the ODBC driver creates an error in Access,
since the incoming values are longer than the field type. This leads
into a truncation warning (with many messageboxes) and no values
are shown at all.

Patch for an encoding bug in the derive_locale_encoding function


I've found a bug while I was working with the driver.

ODBC - Retrieving info messages - RAISE NOTICE


When executing a PL/pgsql query using powershell with ODBC (yes, a somehow special setup), it is possible to register to the event "InfoMessage" (with Register-ObjectEvent) to retrieve all messages that are created for example by using "RAISE NOTICE".
While this works fine when using MS SQL and the SqlConnection (all print statements are retrieved), it does not work with Postgres and the OdbcConnection, here, only the last message ("3") is retrieved, when a statement like
DO $$
is executed.

Maybe this is a general constraint wh

statement timeout with psqlODBC 09.05.300+


This ticket is related to
<a href="" title=""></a>

The client using the ODBC Driver is on Windows 7, must be x86 compatible,
and connect to a 9.6 postgresql database.
from 09.05.300+ version of the ODBC driver x86 (tested up to 10.01), queries
which used to work fine with drivers 08.x now throw "ERROR: canceling
statement due to statement timeout;"

It seems that there is now a default setting for statement timeout coming
with 9.5+ versions of the driver (less than 1 mn), and I did not find any
way to change this settin

Bug in is_setting_search_path


I have found a bug in the is_setting_search_path function (connection.c line 1597).

The search loop is currently:

for (; *q; q++)
if (IS_NOT_SPACE(*q))
if (strnicmp(q, "search_path", 11) == 0)
return TRUE;
while (IS_NOT_SPACE(*q))

The inner while(IS_NOT_SPACE(*q)) loop will terminate if a null is reached.

RE: psqlODBC 10.01.0000 Released -- what about 9.6.6?


I can see that the 09.06.0500 driver disappeared from <a href="" title=""></a>
Will it be back? Will there be an update for PostgreSQL 9.6.6?

psqlODBC 10.01.0000 Released

Hi, all.

We are pleased to annouce the release of psqlODBC 10.01.0000.
please see the notes at:
<a href="" title=""></a>

psqlODBC may be downloaded from in source, Windows Installer,
merge module, and basic zip file formats.

New Windows installer installs both 32-bit and 64-bit driver at once
on 64-bit OS.

Memory leak when using SQLParamData and SQLPutData


When executing a prepared insert statement and using SQL_DATA_AT_EXEC parameters that will be sent with SQLParamData and SQLPutData, the driver will leak memory for parameters. The memory will not be deallocated not even the handles are freed and the program disconnects from the database.

I am attaching a small project to demonstrate the bug. You can also browse the project at <a href="" title=""></a>


MS Access adds always actual day in time defined postgres column


We are moving BackEnd tables from a large MS Access application to postgresql.

In one table we have a field "Zeit" defined in postgres as

time(0) without time zone DEFAULT ('now'::text)::time(0) without time zone,

The linked table inside Access shows the actual day in front of the time value. Using the 24-hour format for displaying time values in Access looks fine.

Migration to PGLister - After


This list has now been migrated to new mailing list software known as

Migration to pglister - Before


We will be migrating these lists to pglister in the next few minutes.

This final email on the old list system is intended to let you know
that future emails will have different headers and you will need to
adjust your filters.

The changes which we expect to be most significant to users can be found
on the wiki here: <a href="" title=""></a>

Once the migration of these lists is complete, an 'after' email will be
sent out.



BUG: odbc statement_timeout gets set to 30000

Hi All

I've found a problem with at least the 906 and 1000 odbc driver, in that, no
matter what statement_timeout is set to, after initially connecting and
setting the value to that specified in the connection settings, it is then
subsequently set to 30000.

This means that queries running longer than 30seconds are failing, which is
a major problem.

session_timeout being set to 30000 bug

Hi All

OK,I've been trying out the later odbc drivers, 906 and 1000.

Trying to replicate from MS 2008 R2 to PostgreSQL

I have a project where I am trying to replicate some tables from a MS2008 SQL database to a PostgreSQL database. I have created a Linked Server using the PostgreSQL ANSI driver and the connection tests successfully. But when I try to create a subscription using that Linked Server, I cannot connect successfully to it. I was wondering if you might have some insights into possible avenues of research for this problem.

Syndicate content