Thread: OID assistance
View Single Post

   
  #5 (permalink)  
Old 04-10-2008, 12:24 AM
Greg Spiegelberg
 
Posts: n/a
Default Re: OID assistance

Tom Lane wrote:
>
> Exactly how are you "using OIDs to store files"? Do you mean you're
> using large objects?


The table is

Table "public.imgs"
Column | Type | Modifiers
----------+--------+------------------------------------------------------
id | bigint | not null default nextval('public.imgs_id_seq'::text)
file | text |
contents | oid |
Indexes: imgs_pkey primary key btree (id)

Data is loaded using INSERT's.

insert into imgs values (1,'/path/to/myfile',lo_import('/path/to/myfile'));

Greg

--
Greg Spiegelberg
Product Development Manager
Cranel, Incorporated.
Phone: 614.318.4314
Fax: 614.431.8388
Email: gspiegelberg@cranel.com
Technology. Integrity. Focus.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote