Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id GAA26368 for postgres-redist; Thu, 12 Jan 1995 06:54:26 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199501121454.GAA26368@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from ENH.NIST.GOV (enh.nist.gov [129.6.16.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with ESMTP id GAA26358 for <postgres@nobozo.CS.Berkeley.EDU>; Thu, 12 Jan 1995 06:54:24 -0800
Received: from ibm4.carb.nist.gov by ENH.NIST.GOV (PMDF V4.2-13 #4653) id
 <01HLR6N6Z81C001204@ENH.NIST.GOV>; Thu, 12 Jan 1995 09:52:03 EST
Received: by ibm4.carb.nist.gov (AIX 3.2/UCB 5.64/4.03) id AA18864; Thu,
 12 Jan 1995 09:43:29 -0500
Date: Thu, 12 Jan 1995 09:43:29 -0500
From: mike@ibm4.carb.nist.gov (Mike Tung)
Subject: the large object
To: postgres@postgres.Berkeley.EDU
Message-id: <9501121443.AA18864@ibm4.carb.nist.gov>
Content-transfer-encoding: 7BIT
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Thu, 12 Jan 95 06:54:25 -0800
Resent-XMts: smtp


Hi, everyone,

I would like to see if anyone was successful to use the large object
of UNIX file.  I tried to define the large object, like below:

define type UnixObj (internallength = variable,
        input = lo_filein,
        output = lo_fileout)
\g
create image_2 (
        name = text,
        raster = UnixObj
)
\g
append image_2 (name="mike", raster="/xray8/mike/bmcd/gif/bmcd1.gif")
\g
append image_2 (name="gary", raster="/xray8/mike/bmcd/gif/gary.gif")
\g
append image_2 (name="travis", raster="/xray8/mike/bmcd/gif/bpti_pcg.gif")
\g
append image_2 (name="carb", raster="/xray8/mike/bmcd/gif/carb3.gif")
\g
append image_2 (name="jane", raster="/xray8/mike/bmcd/gif/viking1.gif")

is", raster="/xray8/mike/bmcd/gif/bpti_pcg.gif")
\g
append image_2 (name="carb", raster="/xray8/mike/bmcd/gif/carb3.gif")
\g
append image_2 (name="jane", raster="/xray8/mike/bmcd/gif/viking1.gif")
\g
append image_2 (name="ji", raster="/xray8/mike/bmcd/gif/viking3.gif")
\g
retrieve (image_2.all) \g

Query sent to backend is "retrieve (image_2.all) "
-----------------------------
| name        | raster      |
-----------------------------
| mike        | /xray8/mike/bmcd/gif/bmcd1.gif|
-----------------------------
| gary        | /xray8/mike/bmcd/gif/gary.gif|
-----------------------------
| travis      | /xray8/mike/bmcd/gif/bpti_pcg.gif|
-----------------------------
| carb        | /xray8/mike/bmcd/gif/carb3.gif|
-----------------------------
| jane        | /xray8/mike/bmcd/gif/viking1.gif|
-----------------------------
| ji          | /xray8/mike/bmcd/gif/viking3.gif|
-----------------------------
ray8/mike/bmcd/gif/carb3.gif|
-----------------------------
| jane        | /xray8/mike/bmcd/gif/viking1.gif|
-----------------------------
| ji          | /xray8/mike/bmcd/gif/viking3.gif|
-----------------------------

It works.

My question is how to access the class "image_2" with user-defined
C function.  Can I use "GetAttributeByName()" in the C function?
What is the return value of GetAttributeByName() for the large
object?

Thanks.

--mike

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
