Getting oid with libpq - Mailing list pgsql-interfaces

From Johan C. de Koning
Subject Getting oid with libpq
Date
Msg-id 20050810093352.EAD8B5287F@svr1.postgresql.org
Whole thread Raw
Responses Re: Getting oid with libpq
List pgsql-interfaces
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB" style="font-size:
10.0pt;font-family:Arial">Hello,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">I have stored some large objects (which are images) with the lo_import function. Now I can
readthe images with the other functions like lo_read within libpq. But I have one problem with the oid I have to give
tothis method. Inside my program I will do a select like this</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanlang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Select texture from building_face where face_id > 100;</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span lang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Textures is the oid field. When I use PQgetValue() I get a complete different value then when
Ido  a select inside pgAdmin. How can I get the same oid so that I can use this for reading the data of the images
insidemy c++ program. Because it is not working with the oid from PQgetValue. </span></font><p class="MsoNormal"><font
face="Arial"size="2"><span lang="EN-GB" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Best regards,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
lang="EN-GB"style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial">Johan de Koning</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
lang="EN-GB"style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-GB"
style="font-size:
10.0pt;font-family:Arial"> </span></font></div>

pgsql-interfaces by date:

Previous
From: jtv@xs4all.nl
Date:
Subject: Re: Getting results after networking error
Next
From: Tomasz Myrta
Date:
Subject: Re: Connect to a PostgreSQL-Server by TCP/IP