Обсуждение: Help me!

Поиск
Список
Период
Сортировка

Help me!

От
"Dieudonne Nanga"
Дата:
How do i insert a file in the database?

Re: Help me!

От
Sonia Sanchez Diaz
Дата:

Hello there!

psql# \copy "table_name" from /path/from/file/to_copy

Regards

Sonny



On Tue, 16 Apr 2002, Dieudonne Nanga wrote:

> How do i insert a file in the database?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: Help me!

От
Bhuvan A
Дата:
On Apr 16, Dieudonne Nanga wrote:

> How do i insert a file in the database?

You mean large objects?
If yes, try

# select lo_import('<filename>');

this will return a OID.
and to access the same, try

# select lo_export(<oid>, '<filename>');

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>