Skip site navigation (1) Skip section navigation (2)

[ psqlodbc-Bugs-1000719 ] string representation for large objects ist wrong

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1000719 ] string representation for large objects ist wrong
Date: 2006-10-23 08:02:50
Message-ID: (view raw or whole thread)
Lists: pgsql-odbc
Bugs item #1000719, was opened at 2006-08-29 15:17
You can respond by visiting:

Category: None
Group: None
>Status: Open
Resolution: None
Priority: 3
Submitted By: Thomas Zehbe (thomasz)
Assigned to: Hiroshi Inoue (hinoue)
Summary: string representation for large objects ist wrong

Initial Comment:
Trying the db sample of wxWidgets 2.7.0-1 the postgreSQL server logged this message:
LINE_CNT,LANGUAGE,PICSIZE,PICTURE) VALUES ('t','','','','','','','1980-01-01 00:00:00'::timestamp,0,0,0,0,28151,'11
FEHLER:  Typ »lo« existiert nicht

The isnert statement tries to insert a blob and the string represanttion ind psqlodbc driver is actually "lo", wich isn't accepted.

After changing the represantion in 2 files to "oid" blob support works.
I changed the following files:
changed #define PG_TYPE_LO_NAME			"lo"
to #define PG_TYPE_LO_NAME			"oid"

convert.c in the ResolveOneParam() function at line 2983
from 	sprintf(param_string, "'%d'::lo", lobj_oid);
to	sprintf(param_string, "'%d'::oid", lobj_oid);

My versions are psqlodbc 8.01.0200 and PostgreSQL 8.0.1

Hope this helps.



Comment By: Thomas Zehbe (thomasz)
Date: 2006-10-23 09:55

Hello Hiroshi Inoue,    
I aggree that OIDs are not necessarily point to large   
objects. But large objects are are represented by oids.A   
snippet from 8.0.3 docs: "SELECT lo_creat(-1);       --   
returns OID of new, empty large object"   
Maybe you have overseen the reported Error message:   
 FEHLER:  Typ »lo« existiert nicht  
what means in english:  
ERROR: Type >lo> doesn't exist  
Thats a cleartext message from the servers logfile an is  
concerned this part of the insert statement reported:  
The first part is the number of bytes of the LO, the 
second is what the driver generates for the LO. My changes 
suggested are leading to this version of insert statement: 
which is not refused by the server. 
I use 8.0.3 currently. Is it misconfigured? Any hints 
would be greatly appreciated as the "lo"-version definitly 
does not work. 
Best Regards, 


Comment By: Hiroshi Inoue (hinoue)
Date: 2006-08-30 02:49

OID doesn't necessarily pointing large objects.
If you are to handle large objects with psqlodbc
driver, please use the type LO.

Hiroshi Inoue


You can respond by visiting:

pgsql-odbc by date

Next:From: Mark Morgan LloydDate: 2006-10-23 15:00:14
Subject: Re: Installation on NT4 revisited
Previous:From: noreplyDate: 2006-10-23 07:55:57
Subject: [ psqlodbc-Bugs-1000719 ] string representation for large objects ist wrong

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group