Richard Wesley | 2 Feb 2007 19:29
Picon

Connect without queries?

Hi -

I am attempting to connect to a Postgres-like database with PGODBC.   
The driver seems to be able to communicate with the server, but it  
complains that the pg_type table could not be found (hardly  
surprising - none of the PG metadata tables are there).

Is there some way to just turn the driver into a data conduit?  Just  
open a connection, make queries and get back data?

TIA,

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Joshua D. Drake | 2 Feb 2007 19:35
Favicon

Re: Connect without queries?

Richard Wesley wrote:
> Hi -
> 
> I am attempting to connect to a Postgres-like database with PGODBC.  The
> driver seems to be able to communicate with the server, but it complains
> that the pg_type table could not be found (hardly surprising - none of
> the PG metadata tables are there).
> 
> Is there some way to just turn the driver into a data conduit?  Just
> open a connection, make queries and get back data?

Not likely, PGODBC requires libpq which is going to at some level try to
communicate with the server beyond the protocol.

Joshua D. Drake

> 
> TIA,
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

--

-- 

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/
(Continue reading)

Dave Page | 2 Feb 2007 19:56
Favicon

Re: Connect without queries?

Joshua D. Drake wrote:
> Richard Wesley wrote:
>> Hi -
>>
>> I am attempting to connect to a Postgres-like database with PGODBC.  The
>> driver seems to be able to communicate with the server, but it complains
>> that the pg_type table could not be found (hardly surprising - none of
>> the PG metadata tables are there).
>>
>> Is there some way to just turn the driver into a data conduit?  Just
>> open a connection, make queries and get back data?
> 
> Not likely, PGODBC requires libpq which is going to at some level try to
> communicate with the server beyond the protocol.

It doesn't require libpq, but it will still be looking for catalogues.

I'm interested to know what a 'postgres-like' database is though -
especially one that doesn't have any catalogues.

/D

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Joshua D. Drake | 2 Feb 2007 20:20
Favicon

Re: Connect without queries?

Dave Page wrote:
> Joshua D. Drake wrote:
>> Richard Wesley wrote:
>>> Hi -
>>>
>>> I am attempting to connect to a Postgres-like database with PGODBC.  The
>>> driver seems to be able to communicate with the server, but it complains
>>> that the pg_type table could not be found (hardly surprising - none of
>>> the PG metadata tables are there).
>>>
>>> Is there some way to just turn the driver into a data conduit?  Just
>>> open a connection, make queries and get back data?
>> Not likely, PGODBC requires libpq which is going to at some level try to
>> communicate with the server beyond the protocol.
> 
> It doesn't require libpq, but it will still be looking for catalogues.

Oh did you guys go back to the protocol speak in the current version?

Sincerely,

Joshua D. Drake

> 
> I'm interested to know what a 'postgres-like' database is though -
> especially one that doesn't have any catalogues.
> 
> /D
> 
> ---------------------------(end of broadcast)---------------------------
(Continue reading)

Dave Page | 2 Feb 2007 20:43
Favicon

Re: Connect without queries?

Joshua D. Drake wrote:
> Dave Page wrote:
>> Joshua D. Drake wrote:
>>> Richard Wesley wrote:
>>>> Hi -
>>>>
>>>> I am attempting to connect to a Postgres-like database with PGODBC.  The
>>>> driver seems to be able to communicate with the server, but it complains
>>>> that the pg_type table could not be found (hardly surprising - none of
>>>> the PG metadata tables are there).
>>>>
>>>> Is there some way to just turn the driver into a data conduit?  Just
>>>> open a connection, make queries and get back data?
>>> Not likely, PGODBC requires libpq which is going to at some level try to
>>> communicate with the server beyond the protocol.
>> It doesn't require libpq, but it will still be looking for catalogues.
> 
> Oh did you guys go back to the protocol speak in the current version?

Yes, we support v3.0 natively now, but can dynamically load libpq for
connection setup if the user wants to use, <cough>pgpass</cough>,
Kerberos or SSL.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

(Continue reading)

noreply | 5 Feb 2007 16:10

[ psqlodbc-Bugs-1001827 ] Error when updating a TIMESTAMP column with NULL using ADODB

Bugs item #1001827, was opened at 2007-02-05 15:10
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001827&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Error when updating a TIMESTAMP column with NULL using ADODB

Initial Comment:
We are having problems setting TIMESTAMP fields to "Null" using ADODB (from Visual Basic 6)

The attached example doesn't work, it reports an invalid date/time-value.

Setting the field to "null" with an SQL-statement works ("update ..."). It doesn't work with 08_02_0200's
Unicode version. The ANSI version works as expected.

The server is running under Linux in version 8.2.0, the clients are running under Windows XP SP2.

----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001827&group_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
(Continue reading)

Picon

PSQLODBC case insensitive

Hi folks
 
I'm accessing my PostgreSQL server from Windev (a french development tool) through the ODBC driver. I created the tables without quotes, so it doesnt if I execute this:
 
SELECT column FROM table
or this:
SELECT CoLuMn FROM tAbLe
 
But when I put the tables and columns names in Windev on lowercase I can access without problems. If I change one or more letters to uppercase I get an error.
Seems like the driver is building the statements like this:
 
SELECT "CoLuMn" FROM "tAbLe"
 
So the server cant find the tables and columns. Thas what I think. I'm I wrong? If not, is that a way that I can make the ODBC driver build the statements without quotes?
 
 
Sorry for my bad English.
 
Antonio Carlos,
Itabuna - BA - Brasil
noreply | 9 Feb 2007 08:44

[ psqlodbc-Bugs-1001827 ] Error when updating a TIMESTAMP column with NULL using ADODB

Bugs item #1001827, was opened at 2007-02-05 15:10
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001827&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Error when updating a TIMESTAMP column with NULL using ADODB

Initial Comment:
We are having problems setting TIMESTAMP fields to "Null" using ADODB (from Visual Basic 6)

The attached example doesn't work, it reports an invalid date/time-value.

Setting the field to "null" with an SQL-statement works ("update ..."). It doesn't work with 08_02_0200's
Unicode version. The ANSI version works as expected.

The server is running under Linux in version 8.2.0, the clients are running under Windows XP SP2.

----------------------------------------------------------------------

>Comment By: Hiroshi Inoue (hinoue)
Date: 2007-02-09 07:44

Message:
PLease try the snapshot dll at
  http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.

regards
Hiroshi Inoue

----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001827&group_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Ludek Finstrle | 9 Feb 2007 17:01
Picon

Re: PSQLODBC case insensitive

> I'm accessing my PostgreSQL server from Windev (a french development
> tool) through the ODBC driver. I created the tables without quotes, so it

Where have you created the tables? Could you try create new one with
logs enabled to see what SQL command is executed?

> doesnt if I execute this:
> 
> SELECT column FROM table
> or this:
> SELECT CoLuMn FROM tAbLe

Sorry, I don't understand what's the problem.

> But when I put the tables and columns names in Windev on lowercase I can
> access without problems. If I change one or more letters to uppercase I get
> an error.
> Seems like the driver is building the statements like this:
> 
> SELECT "CoLuMn" FROM "tAbLe"

What does psqlodbc.log or mylog say (SQL statements)?

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

noreply | 9 Feb 2007 20:03

[ psqlodbc-Bugs-1001906 ] Unable to obtain list of tables from the datasource

Bugs item #1001906, was opened at 2007-02-09 12:03
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001906&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Dave Martin (dave)
Assigned to: Nobody (None)
Summary: Unable to obtain list of tables from the datasource

Initial Comment:
Attempting to use Visio 2007 to access postgres databases for link data to shape purposes results in the
error "Unable to obtain list of tables from the datasource". I have tried both the ansi and unicode drivers.

Using the reverse-engineer database portion of visio works fine.

This might make it seem like a bug in Visio, however link data to tables works fine with other odbc drivers.

I have watched a packet trace between the postgres server and the PC in question, and verified that the list
of tables is in fact returned from postgres to the PC, but apparently it never makes it from the odbc driver
to visio or is corrupted somehow.

I have tried both 8.01 and 8.02 drivers.

Here is mylog:

[5888-0.001]globals.extra_systable_prefixes = 'dd_;'
[5888-0.003]exe name=VISIO plaformId=2
[5888-0.004][[SQLAllocHandle]][5888-0.005]**** in PGAPI_AllocEnv ** 
[5888-0.005]** exit PGAPI_AllocEnv: phenv = 05713B58 **
[5888-0.007][[SQLSetEnvAttr]] att=200,2
[5888-0.008][[SQLAllocHandle]][5888-0.008]PGAPI_AllocConnect: entering...
[5888-0.009]**** PGAPI_AllocConnect: henv = 05713B58, conn = 05713B88
[5888-0.011]EN_add_connection: self = 05713B58, conn = 05713B88
[5888-0.012]       added at i =0, conn->henv = 05713B58, conns[i]->henv = 05713B58
[5888-0.014][SQLGetInfoW(30)][5888-0.015]PGAPI_GetInfo: entering...fInfoType=77
[5888-0.016]PGAPI_GetInfo: p='03.51', len=0, value=0, cbMax=12
[5888-0.017][SQLSetConnectAttrW][5888-0.017]PGAPI_SetConnectAttr for 05713B88: 115 00000000
[5888-0.018]the application is unicode
[5888-0.019][SQLDriverConnectW][5888-0.019]PGAPI_DriverConnect: entering...
[5888-0.020]**** PGAPI_DriverConnect: fDriverCompletion=3, connStrIn='DSN=opennms;'
[5888-0.029]our_connect_string = 'DSN=opennms;'
[5888-0.030]attribute = 'DSN', value = 'opennms'
[5888-0.031]copyAttributes: DSN='opennms',server='',dbase='',user='',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[5888-0.033]getDSNinfo: DSN=opennms overwrite=0
[5888-0.035]rollback_on_error=-1
[5888-0.037]force_abbrev=0 bde=0 cvt_null_date=0
[5888-0.040]globals.extra_systable_prefixes = 'dd_;'
[5888-0.049]our_connect_string = 'DSN=opennms;'
[5888-0.050]attribute = 'DSN', value = 'opennms'
[5888-0.050]CopyCommonAttributes: A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;

AND psqlodbc:
conn=05713B88, PGAPI_DriverConnect( in)='DSN=opennms;', fDriverCompletion=3
DSN info: DSN='opennms',server='postgresql.somedomain.net',port='5432',dbase='opennms',user='xxiii',passwd='xxxxx'
          onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
          conn_settings='',conn_encoding='OTHER'
          translation_dll='',translation_option=''

----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001906&group_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Gmane