Thread: Blobs in PostgreSQL

Blobs in PostgreSQL

From
"Richard Church"
Date:
It seems that PostgreSQL supports Blobs but I couldn't find any mention of
it in the data types section of the manual.

Is it a variant on the Text type, or is it entirely different?

Where in the manual is it described?


Richard
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: Blobs in PostgreSQL

From
Alex Pilosov
Date:
There are many things one may mean by blob.
a) there's old 'large object' interface,
http://www.postgresql.org/idocs/index.php?largeobjects.html

b) the above is rarely necessary now, that there is no limit on amount of
data you can put into one tuple (due to TOASTing of tuples). To store
binary data, you should use bytea type and it has infinite (well, 4G)
limit of data.

On Wed, 27 Jun 2001, Richard Church wrote:

>
> It seems that PostgreSQL supports Blobs but I couldn't find any mention of
> it in the data types section of the manual.
>
> Is it a variant on the Text type, or is it entirely different?
>
> Where in the manual is it described?
>
>
> Richard
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


Re: Blobs in PostgreSQL

From
Gunnar Rønning
Date:
* Alex Pilosov <alex@pilosoft.com> wrote:
|
|
| b) the above is rarely necessary now, that there is no limit on amount of
| data you can put into one tuple (due to TOASTing of tuples). To store
| binary data, you should use bytea type and it has infinite (well, 4G)
| limit of data.

Well, the bytea datatype is not supported by the JDBC driver.
Also it is not documented in the datatype section of the manual.


--
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

Re: Blobs in PostgreSQL

From
Alex Pilosov
Date:
On 27 Jun 2001, Gunnar [iso-8859-1] R�nning wrote:

> Well, the bytea datatype is not supported by the JDBC driver.
Can't do much about that...

> Also it is not documented in the datatype section of the manual.
It [will be] in 7.2 and its documented in CVS now :)


Re: Blobs in PostgreSQL

From
"Richard Church"
Date:
Can it be created and manipulated using the SQL syntax, or does it require
using the C language interface?


>From: Alex Pilosov <alex@pilosoft.com>
>To: Richard Church <rfchurch@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] Blobs in PostgreSQL
>Date: Tue, 26 Jun 2001 22:22:29 -0400 (EDT)
>
>There are many things one may mean by blob.
>a) there's old 'large object' interface,
>http://www.postgresql.org/idocs/index.php?largeobjects.html
>
>b) the above is rarely necessary now, that there is no limit on amount of
>data you can put into one tuple (due to TOASTing of tuples). To store
>binary data, you should use bytea type and it has infinite (well, 4G)
>limit of data.
>
>On Wed, 27 Jun 2001, Richard Church wrote:
>
> >
> > It seems that PostgreSQL supports Blobs but I couldn't find any mention
>of
> > it in the data types section of the manual.
> >
> > Is it a variant on the Text type, or is it entirely different?
> >
> > Where in the manual is it described?
> >
> >
> > Richard
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
> >
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: Blobs in PostgreSQL

From
Alex Pilosov
Date:
SQL syntax is fine.

On Wed, 27 Jun 2001, Richard Church wrote:

>
> Can it be created and manipulated using the SQL syntax, or does it require
> using the C language interface?
>
>
> >From: Alex Pilosov <alex@pilosoft.com>
> >To: Richard Church <rfchurch@hotmail.com>
> >CC: pgsql-general@postgresql.org
> >Subject: Re: [GENERAL] Blobs in PostgreSQL
> >Date: Tue, 26 Jun 2001 22:22:29 -0400 (EDT)
> >
> >There are many things one may mean by blob.
> >a) there's old 'large object' interface,
> >http://www.postgresql.org/idocs/index.php?largeobjects.html
> >
> >b) the above is rarely necessary now, that there is no limit on amount of
> >data you can put into one tuple (due to TOASTing of tuples). To store
> >binary data, you should use bytea type and it has infinite (well, 4G)
> >limit of data.
> >
> >On Wed, 27 Jun 2001, Richard Church wrote:
> >
> > >
> > > It seems that PostgreSQL supports Blobs but I couldn't find any mention
> >of
> > > it in the data types section of the manual.
> > >
> > > Is it a variant on the Text type, or is it entirely different?
> > >
> > > Where in the manual is it described?
> > >
> > >
> > > Richard
> > >
> >_________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at
> >http://www.hotmail.com.
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > >
> > >
> >
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>


Re: Blobs in PostgreSQL

From
"Richard Church"
Date:
Any examples available, please?
On all of creating, insertion, updateing, setting it to null?


>From: Alex Pilosov <alex@pilosoft.com>
>To: Richard Church <rfchurch@hotmail.com>
>CC: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] Blobs in PostgreSQL
>Date: Wed, 27 Jun 2001 08:43:33 -0400 (EDT)
>
>SQL syntax is fine.
>
>On Wed, 27 Jun 2001, Richard Church wrote:
>
> >
> > Can it be created and manipulated using the SQL syntax, or does it
>require
> > using the C language interface?
> >
> >
> > >From: Alex Pilosov <alex@pilosoft.com>
> > >To: Richard Church <rfchurch@hotmail.com>
> > >CC: pgsql-general@postgresql.org
> > >Subject: Re: [GENERAL] Blobs in PostgreSQL
> > >Date: Tue, 26 Jun 2001 22:22:29 -0400 (EDT)
> > >
> > >There are many things one may mean by blob.
> > >a) there's old 'large object' interface,
> > >http://www.postgresql.org/idocs/index.php?largeobjects.html
> > >
> > >b) the above is rarely necessary now, that there is no limit on amount
>of
> > >data you can put into one tuple (due to TOASTing of tuples). To store
> > >binary data, you should use bytea type and it has infinite (well, 4G)
> > >limit of data.
> > >
> > >On Wed, 27 Jun 2001, Richard Church wrote:
> > >
> > > >
> > > > It seems that PostgreSQL supports Blobs but I couldn't find any
>mention
> > >of
> > > > it in the data types section of the manual.
> > > >
> > > > Is it a variant on the Text type, or is it entirely different?
> > > >
> > > > Where in the manual is it described?
> > > >
> > > >
> > > > Richard
> > > >
> >
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: Blobs in PostgreSQL

From
Alex Pilosov
Date:
For which ones?

For bytea fields, you can just use regular functions (substring, etc), and
there's no (well, 2G) limit on size of the field.

For real blobs, its more involved. You are _very strongly suggested_ to
use client-side interfaces, and not SQL interface. (What's the point of
using SQL to fetch a piece of blob on server?  What are you going to do
with it? )

On Thu, 28 Jun 2001, Richard Church wrote:

>
> Any examples available, please?
> On all of creating, insertion, updateing, setting it to null?
>
>
> >From: Alex Pilosov <alex@pilosoft.com>
> >To: Richard Church <rfchurch@hotmail.com>
> >CC: pgsql-general@postgresql.org
> >Subject: Re: [GENERAL] Blobs in PostgreSQL
> >Date: Wed, 27 Jun 2001 08:43:33 -0400 (EDT)
> >
> >SQL syntax is fine.
> >
> >On Wed, 27 Jun 2001, Richard Church wrote:
> >
> > >
> > > Can it be created and manipulated using the SQL syntax, or does it
> >require
> > > using the C language interface?
> > >
> > >
> > > >From: Alex Pilosov <alex@pilosoft.com>
> > > >To: Richard Church <rfchurch@hotmail.com>
> > > >CC: pgsql-general@postgresql.org
> > > >Subject: Re: [GENERAL] Blobs in PostgreSQL
> > > >Date: Tue, 26 Jun 2001 22:22:29 -0400 (EDT)
> > > >
> > > >There are many things one may mean by blob.
> > > >a) there's old 'large object' interface,
> > > >http://www.postgresql.org/idocs/index.php?largeobjects.html
> > > >
> > > >b) the above is rarely necessary now, that there is no limit on amount
> >of
> > > >data you can put into one tuple (due to TOASTing of tuples). To store
> > > >binary data, you should use bytea type and it has infinite (well, 4G)
> > > >limit of data.
> > > >
> > > >On Wed, 27 Jun 2001, Richard Church wrote:
> > > >
> > > > >
> > > > > It seems that PostgreSQL supports Blobs but I couldn't find any
> >mention
> > > >of
> > > > > it in the data types section of the manual.
> > > > >
> > > > > Is it a variant on the Text type, or is it entirely different?
> > > > >
> > > > > Where in the manual is it described?
> > > > >
> > > > >
> > > > > Richard
> > > > >
> > >
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>