Re: binary data storage
От | Denis Gasparin |
---|---|
Тема | Re: binary data storage |
Дата | |
Msg-id | 1017930765.2197.3.camel@edspctec12 обсуждение исходный текст |
Ответ на | Re: binary data storage (Martín Marqués <martin@bugs.unl.edu.ar>) |
Ответы |
Re: binary data storage
|
Список | pgsql-general |
Hi Martin, I discourage you to use the large object data type for a file of such dimensions... It would be better for you to store in the db the filename and the path to the file itself. However you can find the large object you've inserted in your data directory (subdirectory base/oid of your database/). Bye, -- Doct. Eng. Denis Gasparin: denis@edistar.com --------------------------- Programmer & System Administrator - Edistar srl Il gio, 2002-04-04 alle 14:07, Martín Marqués ha scritto: > On Jue 04 Abr 2002 06:42, you wrote: > > Hi Marin, > > > > On Thu, 4 Apr 2002, Marin Dimitrov wrote: > > > search for "large objects" in the Programmer's Guide ( > > > http://www.ca.postgresql.org/users-lounge/docs/#7.2 ) > > > > > > in your case Large Objects (chapter 2 from the Programmer's Guide) may be > > > more appropriate than binary strings (chapter 3.4 from the User's Guide) > > > > Thanks alot. Also searched php manual and wrote the following simple code: > > > > <? > > $conn = Pg_Connect (......); > > pg_exec ($conn, "begin"); > > $oid = pg_locreate ($conn); > > echo ("$oid\n"); > > $handle = pg_loopen ($conn, $oid, "w"); > > echo ("$handle\n"); > > pg_loimport ("/etc.tar.gz"); > > pg_lowrite ($handle, "/etc.tar.gz"); > > This is something that confuses me: > What does pg_loimport do, and what does pg_lowrite do? > > > pg_loclose ($handle); > > pg_exec ($conn, "commit"); > > ?> > > Another question I have about using PHP and PostgreSQL Large Objects, is that > in no place there is a reference to where the lo will be stored? > > I mean, where will /etc.tar.gz be stored in the Database? > > Saludos... :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarques@unl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > ----------------------------------------------------------------- > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
В списке pgsql-general по дате отправления: