pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Reg: Insert bytea values in to table
2+ messages / 2 participants
[nested] [flat]

* Reg: Insert bytea values in to table
@ 2012-01-06 07:03  Hariraman Jayaraj <hariraman.ocp@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Hariraman Jayaraj @ 2012-01-06 07:03 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Reg: Insert bytea values in to table
@ 2012-01-06 08:39  Misa Simic <misa.simic@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Misa Simic @ 2012-01-06 08:39 UTC (permalink / raw)
  To: Hariraman Jayaraj <hariraman.ocp@gmail.com>; 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@postgresql.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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-01-06 08:39 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 07:03 Reg: Insert bytea values in to table Hariraman Jayaraj <hariraman.ocp@gmail.com>
2012-01-06 08:39 Re: Reg: Insert bytea values in to table Misa Simic <misa.simic@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox