Re: Oid data type question - Mailing list pgsql-general

From Karel Zak
Subject Re: Oid data type question
Date
Msg-id Pine.LNX.3.96.1000413183642.1989G-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Oid data type question  (Farren Isaacs <farren@bu.edu>)
List pgsql-general
On Thu, 13 Apr 2000, Farren Isaacs wrote:

> I'm relatively new to psql.  I have created a database with Oid data
> types
> in it.  I am now trying to populate the tables with data, from a file
> but
> I am not sure how to get the path names into the Oid fields.  I have
> tried
> commands like:
>
> insert into gene values('cI', '1', lo_import('filename1'),
> lo_import('filename2'), 'control');

 A lo_xxxxx() in standard query works on backend's host disk only.

 a example:

test=# create table tab (data text, lo oid);
CREATE
test=# insert into tab values ('my new data', lo_import('/tmp/aaa'));
INSERT 179545 1
test=# select * from tab;
    data     |   lo
-------------+--------
 my new data | 179531
(1 row)


 If you want use LO in backend<->frondend connection you must use LO API
(example in C/PHP/Perl..etc) or you can use new (7.0) pgsql client.


                            Karel


pgsql-general by date:

Previous
From: Matthew Arnison
Date:
Subject: database file size bloat
Next
From: Marten Feldtmann
Date:
Subject: Re: How big a database will PostgreSQL support?