Thread: Large Objects
<p><font color="#808080" face="Verdana" size="2">I have been reading the user manual for largre objects in postgres. WhatI do not understand is when and why you would use them?</font><p><font color="#808080" face="Verdana" size="2">Can someonepoint me to some good documentation on this...</font><br /><p><font color="#808080" face="Verdana" size="2">Thanks,</font><br/><p><b><font face="Verdana" size="2">Ray Hunter</font></b><br /><font face="Verdana" size="2">FirmwareEngineer</font><p><b><font face="Verdana" size="2">ENTERASYS NETWORKS</font></b><p><font face="Verdana"size="2">Phone: 801 887-9888</font><br /><font face="Verdana" size="2">Fax: 801 972-5789</font><br/><font face="Verdana" size="2">Email: </font><a href="mailto:rhunter@enterasys.com"><u><fontcolor="#0000FF" face="Verdana" size="2">rhunter@enterasys.com</font></u></a><br/><font face="Verdana" size="2">www: </font><a href="http://www.enterasys.com"><u><fontcolor="#0000FF" face="Verdana" size="2">www.enterasys.com</font></u></a>
Ray, A large object is simply a large amount of data. Like a tif file or any other data that you would like to store. Personally, I would not store a large object in the database. Instead, use the locale hard disk and refer to the path to the object. Your front end would receive the path and request the OS for the file. ted -----Original Message----- From: "Hunter, Ray" <rhunter@enterasys.com> To: pgsql-sql@postgresql.org Date: Wed, 27 Feb 2002 08:45:54 -0500 Subject: [SQL] Large Objects > I have been reading the user manual for largre objects in postgres. > What I > do not understand is when and why you would use them? > > Can someone point me to some good documentation on this... > > > Thanks, > > > Ray Hunter > Firmware Engineer > > ENTERASYS NETWORKS > > Phone: 801 887-9888 > Fax: 801 972-5789 > Email: rhunter@enterasys.com <mailto:rhunter@enterasys.com> > www: www.enterasys.com <http://www.enterasys.com> > >
Hi, Morning All: Large objects in PostgreSQL are simply large chunks of information which you may want to store in a database for reasons I don't know. Example is if you want to store the actual JPEG file in the database and not just reference it as a string and just put it as a file in another directory. A possible reason for hiding the actual JPEG file in a database is to hide it from your Sys Ad if those JPEG file contains "PORNO" images (Sorry, no pun intended, it just was the case with a friend of mine, hhehehe). Anyway, an experimental application I know of stores geographical images as large objects in a postgresql database. Good luck with large objects, it may sound hard but after you get to know it, it just becomes a walk in the park. Erle On Wed, 27 Feb 2002, Hunter, Ray wrote: > I have been reading the user manual for largre objects in postgres. What I > do not understand is when and why you would use them? > > Can someone point me to some good documentation on this...
Don't use them. They were needed when Postgres only supported 8k per row. Now you can just use the 'text' datatype for text data and the 'bytea' datatype for binary data. You have a limit of a few gigs per row with them.
Chris
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Hunter, Ray
Sent: Wednesday, 27 February 2002 9:46 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Large ObjectsI have been reading the user manual for largre objects in postgres. What I do not understand is when and why you would use them?
Can someone point me to some good documentation on this...
Thanks,
Ray Hunter
Firmware EngineerENTERASYS NETWORKS
Phone: 801 887-9888
Fax: 801 972-5789
Email: rhunter@enterasys.com
www: www.enterasys.com
> Don't use them. They were needed when Postgres only supported 8k > per row. Now you can just use the 'text' datatype for text data > and the 'bytea' datatype for binary data. You have a limit of a > few gigs per row with them. The problem with the text or bytea type is, that inserting large amounts of data causes a big performance loss because everything must go through the SQL-Parser. I would be glad if someone would correct me. So far I have found no way to grant integrity / use PG's transactions for large objects with satisfying performance. lo_import/export for bytea would be a very nice interface to transfer directly between the database and files readable/writable by the client process. Suggestions are welcome. Stony