Обсуждение: Re: [HACKERS] BLOB HOWTO??

Поиск
Список
Период
Сортировка

Re: [HACKERS] BLOB HOWTO??

От
Olivier PRENANT
Дата:
Hi Bruce,

Any idea when it's due for??
I've been thining about writing a user function; But I'll get stuck with
permission as a user function is running under the "postgres" or whatever
user instead of the calling user.

Also, what kind of binary interface are you thinking of??

Regards,On Sun, 28 Jan 2001, Bruce Momjian wrote:

> No way.  We haven't written a binary interface to TOAST yet.
> 
> > Hi,
> > 
> > Beeing very impressed by TOAST, I wonder how I can insert BLOB from a flat
> > file.
> > 
> > It seems quite easy with php; But how can I do it from psql??
> > 
> > TIA
> > 
> > -- 
> > Olivier PRENANT             Tel:    +33-5-61-50-97-00 (Work)
> > Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
> > 31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
> > FRANCE                      Email: ohp@pyrenet.fr
> > ------------------------------------------------------------------------------
> > Make your life a dream, make your dream a reality. (St Exupery)
> > 
> > 
> 
> 
> 

-- 
Olivier PRENANT             Tel:    +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)



Re: [HACKERS] BLOB HOWTO??

От
Bruce Momjian
Дата:
> Hi Bruce,
> 
> Any idea when it's due for??
> I've been thining about writing a user function; But I'll get stuck with
> permission as a user function is running under the "postgres" or whatever
> user instead of the calling user.
> 
> Also, what kind of binary interface are you thinking of??

Lack of large object support for new TOAST columns is going to be a big
7.1 complaint.  I was thinking of using the same functions as our large
object stuff, but remove the OID requirement.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [HACKERS] BLOB HOWTO??

От
Bruce Momjian
Дата:
> Hi Bruce,
> 
> Any idea when it's due for??

When?  Probably not until 7.2, which is a pain.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: [HACKERS] BLOB HOWTO??

От
Jan Wieck
Дата:
Bruce Momjian wrote:
> > Hi Bruce,
> >
> > Any idea when it's due for??
>
> When?  Probably not until 7.2, which is a pain.
   We cannot use TOAST as is for BLOB/CLOB storage with a binary   IO interface over fastpath.
   The reason is that you cannot force a column to be moved  off   anyway  and  that  the  toast reference contains the
original  objects size.  Thus, opening a BLOB for writing would require   the  reference  in  the  main  tuple to get
updatedand maybe   moving off the data first.
 
   My plans for 7.2 are to use the toast table for storage,  but   to build new data types with support hooks in the
toasterfor   it.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Re: [HACKERS] BLOB HOWTO??

От
Jan Wieck
Дата:
Olivier PRENANT wrote:
> Hi Bruce,
>
> Any idea when it's due for??
> I've been thining about writing a user function; But I'll get stuck with
> permission as a user function is running under the "postgres" or whatever
> user instead of the calling user.
>
> Also, what kind of binary interface are you thinking of??
   Something similar to the existing lo_...() functions.
   Actually,  someone  should  use the existing large objects to   deal with binary content.  What has to be kept in
mindis
 
   1.  You have to cleanup yourself - the existing large objects       aren't  removed  automatically  if you delete a
tablerow       referencing to the LO or drop the table.
 
   2.  The existing LOs don't have copy  behaviour.  So  if  you       reference  to  a  LO  from one table and do an
INSERT...       SELECT, just it's OID is copied,  not  the  data  (as  it       should be IMHO).
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Re: [HACKERS] BLOB HOWTO??

От
Olivier PRENANT
Дата:
Bruce,

Thanks for replying (I know you're a busy man :)

Any chance to have it backported to 7.1 or maybe in contrib???

This is a feature w all gonna lack (with GiST...)

Regards,
On Mon, 29 Jan 2001, Bruce Momjian wrote:

> > Hi Bruce,
> > 
> > Any idea when it's due for??
> > I've been thining about writing a user function; But I'll get stuck with
> > permission as a user function is running under the "postgres" or whatever
> > user instead of the calling user.
> > 
> > Also, what kind of binary interface are you thinking of??
> 
> Lack of large object support for new TOAST columns is going to be a big
> 7.1 complaint.  I was thinking of using the same functions as our large
> object stuff, but remove the OID requirement.
> 
> 

-- 
Olivier PRENANT             Tel:    +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)



Re: [HACKERS] BLOB HOWTO??

От
Franck Martin
Дата:
I'm interested by TOAST, and I have asked several questions on the subject...
I haven't tested them yet...

First I thought that the type bytea allows storing of binary data, a BSOB
(Binary Small OBject).
Secondly that by using a binary cursor you have access to the raw data as it
is stored in the database, but not as it is presented in ASCII
Thridly we could use a funtion to retreive parts of columns, something like
mid(column,start,length)
Fourthly we may use the same function for storing data back.

Cheers...
Franck@sopac.org

Jan Wieck wrote:

> Olivier PRENANT wrote:
> > Hi Bruce,
> >
> > Any idea when it's due for??
> > I've been thining about writing a user function; But I'll get stuck with
> > permission as a user function is running under the "postgres" or whatever
> > user instead of the calling user.
> >
> > Also, what kind of binary interface are you thinking of??
>
>     Something similar to the existing lo_...() functions.
>
>     Actually,  someone  should  use the existing large objects to
>     deal with binary content.  What has to be kept in mind is
>
>     1.  You have to cleanup yourself - the existing large objects
>         aren't  removed  automatically  if you delete a table row
>         referencing to the LO or drop the table.
>
>     2.  The existing LOs don't have copy  behaviour.  So  if  you
>         reference  to  a  LO  from one table and do an INSERT ...
>         SELECT, just it's OID is copied,  not  the  data  (as  it
>         should be IMHO).
>
> Jan
>
> --
>
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me.                                  #
> #================================================== JanWieck@Yahoo.com #
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com