DevHeads.net

Postings by Igor Korot

Compatibility

Hi, ALL,
Is latest ODBC driver for PostreSQL can be run on Windows XP SP3?

If not - what version is compatible? Is it available to download?

Thank you.

NOTIFY/LISTEN with ODBC interface

Hi,
Is there a way to write a code found at
<a href="https://www.postgresql.org/docs/9.1/libpq-example.html" title="https://www.postgresql.org/docs/9.1/libpq-example.html">https://www.postgresql.org/docs/9.1/libpq-example.html</a>
Example 2 with the ODBC interface?

Thank you.

SQLTables does not retrieve everything

Hi,
I am trying to write an application where I need to know the list of
"ALL" tables and views.

However, it looks like the code:

[code]
ret = SQLTables( m_hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0 );
if( ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO )
{
GetErrorMessage( errorMsg, 1 );
result = 1;
}
[/code]

only retrieves the tables from the current database/catalog and "public" schema.

There is no tables/view on the INFORMATION_SCHEMA and all the system tables.

Do I have to drop it and use the actual que

ODBC driver on OSX

Hi,
I downloaded the source code and then did:

./configure
make
sudo make install

on the sources

Then I opened iODBC DM 64-bit but couldn't find any references to the driver.

What did I do wrong?

This is on OSX 10.13.6 High Sierra.

Thank you.

Log file

Hi, ALL,
I'm trying to test the functionality of logging on my older Mac with
PostgreSQL 9.1.

I see that the logile is created with the owner of postgres and the
group of wheel.

Is there a way to make it open with "<current_user><current_user>"?
Or I will have to change the owner/group manuall every time I will
access the file?

Thank you.

What is the problem with this code?

Hi, ALL,

[code]
std::wstring query1 = L"SHOW log_directory";
std::wstring query2 = L"SHOW log_filename";
SQLWCHAR *qry1 = new SQLWCHAR[query1.length() + 2];
SQLWCHAR *qry2 = new SQLWCHAR[query2.length() + 2];
memset( qry1, '\0', query1.length() + 2 );
memset( qry2, '\0', query2.length() + 2 );
uc_to_str_cpy( qry1, query1 );
uc_to_str_cpy( qry2, query2 );
RETCODE ret = SQLAllocHandle( SQL_HANDLE_STMT, m_hdbc, &m_hstmt );
if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO )
{
ret = SQLPrepare( m_hstmt, qry1, SQL_NTS );
if( ret != S

Why this code fails

Hi,
Following code fails with the error "Invalid column nuber in DescribeCol".

I'm trying to run it with the iODBC DM and the official PG ODBC driver.

[code]
int ODBCDatabase::AskPostgresForLogFile()
{
int result = 0;
SQLWCHAR *columnName = new SQLWCHAR[256], *columnData;
SQLSMALLINT columnNameLen, columnDataType, columnDataDigits,
columnDataNullable;
SQLLEN columnDataLen;
SQLULEN columnDataSize;
std::wstring query = L"SHOW log_directory";
std::vector<std::wstring> errorMsg;
SQLWCHAR *qry = new SQLWCHAR[query.length() + 2];
memset( qry, '\0', query.length(

Building programs with libpq

Hi,
<a href="https://www.postgresql.org/docs/9.5/static/libpq-build.html" title="https://www.postgresql.org/docs/9.5/static/libpq-build.html">https://www.postgresql.org/docs/9.5/static/libpq-build.html</a> tells I
need pkg-config to supply to the Makefile to be able to build the
program.

However it is availble on *nix only and not on Mac.

Is there Mac equivalent?

I'm doing development on Xcode, so maybe pg-config is enough?

Thank you.

Building libpq independently of server

Hi,
Is there a way to build libpq on OSX without buillding the whole server?
I will connect to external server and don't want to build everything
just to get a client library.

If I can't - is there a reason?
I mean it is a client-server DBMS and it should be possible to build
one without the other.

There was a package called libpq that can be installed independently
on *nix, but for some reason it is no longer available.

Can anyone help?

Thank you.

PostgreSQL on OSX

Hi,
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:

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

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.

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;
SQLWCHAR *owner = 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 application works while libpq fails

Hi,
I have a very weird situation.

I am trying to develop an application which will connect to the PostgreSQL
server thru 2 different methods: thru the ODBC and using libpq.

Environment:
MacOSX 10.8.
Xcode 4 (latest available for 10.8)
PostgreSQL 9.1 - original from OSX.
Application is compiled with the UNICODE
iODBC DM for OSX 10.8.
Both application and DB server running on the same machine.
The database I'm using was created with the default parameters (just
CREATE DATABASE draft).

When I connect with the ODBC driver, the application works as expected
- no errors or problems.

However whe

HY0000 on SQLDescribeParam

Hi, ALL,
I'm getting an error calling SQLDescribeParam() on PostgreSQL 9.4.

The message obtained by SQLGetDiagRec() reads:

[quote]
Unfortunately couldn't get this parameter info.
[/quote]

I'm on OSX 10.8 using iODBC DM.
The PostgreSQL ODBC driver is not the current one (at least I don't think so).

This same call succeeded with MS SQL Server.

Does anybody have an idea of how to work around this?

Connection failed [was: Re: [ODBC] Distribution package for OSX]

Hi, guys,
So I moved a little further with this.

First of all I found out that default OSX install comes with client tools
pre-installed. No server.

So I installed the PostgreSQL server on my Mac.

Next is trying to connect with iODBC.

But first I tried to open SQL Shell (psql).

Distribution package for OSX

Hi,
I'm looking for a ready-to-use distribution package of the PostgreSQL ODBC
driver for OSX 10.8 (.dmg file).

Is it readily available or I will have to build the driver manually?

Thank you.

Problem with mySQL ODBC driver

Hi, list,
I'm trying to install and use mySQL ODBC driver on my Mac 10.8.5.

First I tried to install one from
<a href="https://dev.mysql.com/downloads/connector/odbc/" title="https://dev.mysql.com/downloads/connector/odbc/">https://dev.mysql.com/downloads/connector/odbc/</a>.
The file name is mysql-connector-odbc-5.3.6-osx10.9-x86-64bit.dmg).

However trying to install it I got following error:

The installer encountered an error that caused the installation to fail. Contact
the software manufacturer for assistance.

I tried to send an E-mail to myodbc list as well ask for help on the
mySQL forum.
Both failed.

Is there a version for OSX 10.8?

Hi,
I recently tried to download the dmg package for the MySQL ODBC driver
and tried to install it
on my OSX 10.8.

It failed.

Is there a version that can be installed on my Mac or I will have to
build it from sources,
which I'd like to avoid?

Thank you.