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-08-30 00:49:22
Message-ID: 20060830004922.4249786C6DE@pgfoundry.org (view raw or flat)
Thread:
Lists: pgsql-odbc
Bugs item #1000719, was opened at 2006-08-29 13:17
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000719&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Thomas Zehbe (thomasz)
Assigned to: Nobody (None)
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:
LOG:  Anweisung: INSERT INTO contacts (NAME,ADDRESS1,ADDRESS2,CITY,STATE,POSTCODE,COUNTRY,JOINDATE,IS_DEV,CONTRIBS,
LINE_CNT,LANGUAGE,PICSIZE,PICTURE) VALUES ('t','','','','','','','1980-01-01 00:00:00'::timestamp,0,0,0,0,28151,'11
8667'::lo)
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:
psqlodbc.h
changed #define PG_TYPE_LO_NAME			"lo"
to #define PG_TYPE_LO_NAME			"oid"

and
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.
Regards

Thomas

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

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

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

regards,
Hiroshi Inoue



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

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

pgsql-odbc by date

Next:From: LLCDate: 2006-08-30 01:04:55
Subject: Oracle HSODBC problems
Previous:From: Hiroshi SaitoDate: 2006-08-30 00:40:59
Subject: Re: [COMMITTERS] psqlodbc - psqlodbc: Fixed dllname of win32 ANSI: psqlodbca Unicode:

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