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

Re: OID assistance

From: Greg Spiegelberg <gspiegelberg(at)cranel(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: OID assistance
Date: 2005-02-18 15:54:15
Message-ID: 42160FA7.8030607@cranel.com (view raw or flat)
Thread:
Lists: pgsql-admin
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(at)cranel(dot)com
Technology. Integrity. Focus.


In response to

Responses

pgsql-admin by date

Next:From: David.JacquesDate: 2005-02-18 16:13:39
Subject: Libpq: Passing a Pgconn* object between console applications ?
Previous:From: Tom LaneDate: 2005-02-18 15:02:36
Subject: Re: OID assistance

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