Re: Oid data type question

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: Oid data type question
Дата
Msg-id Pine.LNX.3.96.1000413183642.1989G-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на Oid data type question  (Farren Isaacs <farren@bu.edu>)
Список 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 по дате отправления:

Предыдущее
От: Matthew Arnison
Дата:
Сообщение: database file size bloat
Следующее
От: Marten Feldtmann
Дата:
Сообщение: Re: How big a database will PostgreSQL support?