Tom,
My product is a library on top of the libpq C Library. The product API
provides our users flexibility to run any SQL. The results of the
execution are processed generically based on the result schema returned
by libpq.
I can think of these use cases on the top of my head which would need to
distinguish oid from lo:

1. Fetching OID of a user defined type. It could be used for other
operations on the type, such as parameter binding, result field type
identification, etc.

2. Querying system tables. Tables such as pg_class, pg_attribute, etc
return many fields which are of type OID.

3. Querying tableoid or oid columns of a user table.

In all the above cases, OIDs are to be returned as integers. OTOH, for
an lo object the object must be fetched and returned.

Thank you.
Unmesh


-----Original Message-----
From: Tom Lane [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 10:57 PM
To: Unmesh Churi
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #3015: libpq: PQftype() on a lo type result
column returns Oid of type oid instead of Oid of type lo. 

"Unmesh Churi" <[EMAIL PROTECTED]> writes:
> Thanks Tom. I used to rely on the PQftype() to determine if the OIDs
> stored in that result field are pointing to large objects or not. If
> they are large objects, I used to fetch them using lo_* API.
> Now since PQftype() returns type oid for type lo columns, how will I
> identify if a result column contains large objects or not?

Do you need to identify that?  What other use-case has your application
got for fetching OID columns?

                        regards, tom lane

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

Reply via email to