X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6AA78D1B56B for ; Fri, 5 Sep 2003 12:00:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 23749-10 for ; Fri, 5 Sep 2003 09:00:11 -0300 (ADT) Received: from jais.jouy.inra.fr (jais.jouy.inra.fr [138.102.1.17]) by svr1.postgresql.org (Postfix) with ESMTP id 50A5FD1B52C for ; Fri, 5 Sep 2003 09:00:07 -0300 (ADT) Received: from diamant.jouy.inra.fr (localhost [127.0.0.1]) by jais.jouy.inra.fr (8.10.1/8.10.1) with ESMTP id h85BxlV23238 for ; Fri, 5 Sep 2003 13:59:47 +0200 (MET DST) Received: from pc502jlo (pc502ljo [138.102.3.71]) by diamant.jouy.inra.fr (8.10.1/8.10.1) with SMTP id h85Bxha26313; Fri, 5 Sep 2003 13:59:43 +0200 (MET DST) Message-ID: <009201c373a5$340f1e70$4703668a@pc502jlo> From: "Jouneau Luc" To: "Somasekhar Bangalore" Cc: References: Subject: Re: Blob Data type in postgres ? Date: Fri, 5 Sep 2003 13:59:46 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_008F_01C373B5.F727EE90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.8 tagged_above=0.0 required=5.0 tests=BAYES_30, HTML_40_50, HTML_FONT_COLOR_BLUE, RCVD_IN_OSIRUSOFT_COM, REFERENCES X-Spam-Level: X-Archive-Number: 200309/95 X-Sequence-Number: 10183 This is a multi-part message in MIME format. ------=_NextPart_000_008F_01C373B5.F727EE90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable As far as I am concerned, I think that lobs are managed in postgres with oi= d. Create your table like this : CREATE TABLE table_of_lobs ( title varchar(100), content_reference oid); content_reference is a handler on lobs data contained in specials postgres = system tables called Toast. Create a rule to automatically destroy LOB data when you delete a tuple in = table_of_lobs : CREATE RULE del_table_of_lobs AS ON DELETE TO table_of_lobs DO SELECT lo_unlink(old.content) AS lo_unlink; Once you've created your table, use lo_import/lo_export functions to import= /export your LOB data in a pgsql session (you must be super useer) or use LOBS management functions available in libpq in order to interface l= obs data management in your favorite program language. Regards, Luc Jouneau ----- Original Message -----=20 From: Somasekhar Bangalore=20 To: pgsql-admin@postgresql.org=20 Sent: Friday, September 05, 2003 12:41 PM Subject: [ADMIN] Blob Data type in postgres ? Hi , I would like to create a table with blob as a datatype.I found that postg= res doesn't have a datatype called BLOB.=20 Is there any equivalent data type for this or a short cut ? I appreciate if some one can help me in this regard. Thank you all, Regards,=20 Somasekhar Bangalore=20 Principal Software Engineer=20 ZenSutra Software Technologies Pvt. Ltd.=20 Suite 601, HM Geneva House=20 #14, Cunningham Road=20 Bangalore 560-052, India=20 Ph:+91-80-235-0481=20 Fax:+91-80-235-0486=20 Email: sbangalore@zensutra.com=20 Weaving the knowledge tapestry'=20 ------=_NextPart_000_008F_01C373B5.F727EE90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
As far as I am concerned, I think that lob= s are=20 managed in postgres with oid.
 
Create your table like this :
CREATE TABLE table_of_lobs (
title varchar(100),
content_reference oid);
 
content_reference is a handler on lobs dat= a=20 contained in specials postgres system tables called Toast.
Create a rule to automatically destroy LOB= data=20 when you delete a tuple in table_of_lobs :
CREATE RULE del_table_of_lobs AS ON DELETE= TO=20 table_of_lobs
DO SELECT lo_unlink(old.content) AS lo_unlink;
 
Once you've created your table, use=20 lo_import/lo_export functions to import/export your LOB data in a pgsql ses= sion=20 (you must be super useer)
or use LOBS management functions available= in libpq=20 in order to interface lobs data  management in your favorite program= =20 language.
 
Regards,
 
Luc Jouneau
 
----- Original Message -----
Fro= m:=20 Somasekhar Bangalore
Sent: Friday, September 05, 2003 1= 2:41=20 PM
Subject: [ADMIN] Blob Data type in= =20 postgres ?

Hi=20 ,
 
I=20 would like to create a table with blob as a datatype.I found that=20 postgres doesn't have a datatype called BLOB.=20
Is=20 there any equivalent data type for this or a short cut ?
 
I=20 appreciate if some one can help me in this regard.
 
Thank you all,

Regards,
Somasekhar Bangalore
Principal Software Engineer= =20
ZenSutra Software Technologies Pvt= .=20 Ltd.
Suite 601, HM Geneva House=20
#14, Cunningham Road
Bangalore 560-052, India

Ph:+91-80-235-0481
Fax:+91-80-235-0486
Email= :=20 sbangalore= @zensutra.com=20

Weaving the knowledge tapestry'

 
------=_NextPart_000_008F_01C373B5.F727EE90--