Skip site navigation (1) Skip section navigation (2)

Re: Reg: Insert bytea values in to table

From: Misa Simic <misa(dot)simic(at)gmail(dot)com>
To: Hariraman Jayaraj <hariraman(dot)ocp(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Reg: Insert bytea values in to table
Date: 2012-01-06 08:39:21
Message-ID: -4544684390160500629@unknownmsgid (view raw or flat)
Thread:
Lists: pgsql-admin
Hi

INSERT INTO table( pdffile) VALUES
(pg_readbinary_file('path_to_pdffile_on_server'))

Sent from my Windows Phone
------------------------------
From: Hariraman Jayaraj
Sent: 06/01/2012 08:04
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Reg: Insert bytea values in to table

Hi,

Postgres Version - 8.3
OS - Suse Linux 11 Enterprise Edition


I have a requirement to store pdf files in db. I am suggested to use bytea
data type to achieve this.

I am having an table *ledger* with columns *
id bigint,
pdffile bytea

*I want to store the pdf files in the pdffile column.
Kindly suggest me how to do this.
Thanks in advance.

-- 
Regards,
Hariraman Jayaraj
Mobile - 9786228845

pgsql-admin by date

Next:From: Jan-Peter SeifertDate: 2012-01-06 22:06:12
Subject: Re: List archives dead?
Previous:From: Hariraman JayarajDate: 2012-01-06 07:03:54
Subject: Reg: Insert bytea values in to table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group