Re: Help me!

Lists: pgsql-admin
From: "Dieudonne Nanga" <nanga(at)compilion(dot)de>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Help me!
Date: 2002-04-16 14:22:25
Message-ID: B7AE969188F6AA44BB3FCD88A6AFD3770792A3@pdc-compilion.COMPILION
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

How do i insert a file in the database?


From: Sonia Sanchez Diaz <sonny(at)piaget(dot)dgsca(dot)unam(dot)mx>
To: Dieudonne Nanga <nanga(at)compilion(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Help me!
Date: 2002-04-16 20:39:15
Message-ID: Pine.SGI.4.10.10204161338210.142933-100000@piaget.dgsca.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>


From: Bhuvan A <bhuvansql(at)yahoo(dot)com>
To: Dieudonne Nanga <nanga(at)compilion(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Help me!
Date: 2002-04-17 05:29:15
Message-ID: Pine.LNX.4.20.0204171057180.2528-100000@Larry
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin


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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>