From and_k_98@yahoo.com Thu Aug 22 13:34:12 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BB551475AFF for ; Thu, 22 Aug 2002 09:34:12 -0400 (EDT) Received: from web20417.mail.yahoo.com (web20405.mail.yahoo.com [66.163.169.93]) by postgresql.org (Postfix) with SMTP id 0D6F34759B0 for ; Thu, 22 Aug 2002 09:34:12 -0400 (EDT) Message-ID: <20020822133416.86495.qmail@web20417.mail.yahoo.com> Received: from [212.45.22.233] by web20405.mail.yahoo.com via HTTP; Thu, 22 Aug 2002 06:34:16 PDT Date: Thu, 22 Aug 2002 06:34:16 -0700 (PDT) From: Andrew Klimov Subject: bytea etc. To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-281263480-1030023256=:85244" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/311 X-Sequence-Number: 9157 --0-281263480-1030023256=:85244 Content-Type: text/plain; charset=us-ascii Hi , All! Could someone clarify me : When I want to store BLOB's internally in database (for example jpeg )should I use bytea or OID? Is OID something like BFILE in Oracle 8i? If both are appropriate for internal BLOB why I can't use update image set picture=lo_import('Myfile') where image_code='blablabla' ; with bytea column type but only with OID column type? And one more thing:Where is function byteain documented? TIA,Andrew. --------------------------------- Do You Yahoo!? HotJobs, a Yahoo! service - Search Thousands of New Jobs --0-281263480-1030023256=:85244 Content-Type: text/html; charset=us-ascii
Hi , All!
 
Could someone clarify me  :
 
When I want to store BLOB's internally in database (for example jpeg )
should I use bytea or OID? Is OID something like BFILE in Oracle 8i?
 
If both are appropriate for internal BLOB why I can't use
 
update image set picture=lo_import('Myfile') where image_code='blablabla' ;
 
with bytea column type but only with OID column type?
 
 
And one more thing:
Where is function byteain documented?
 
TIA,
Andrew.



Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs --0-281263480-1030023256=:85244-- From klimov@fotobank.com Thu Aug 22 13:31:46 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C3EC1475CF3 for ; Thu, 22 Aug 2002 09:31:46 -0400 (EDT) Received: from ns.fotobank.ru (unknown [212.45.5.179]) by postgresql.org (Postfix) with ESMTP id 643D6475CBB for ; Thu, 22 Aug 2002 09:31:45 -0400 (EDT) Received: from jippy (gw.fotobank.ru [212.45.5.180]) by ns.fotobank.ru (8.11.6/8.11.6) with SMTP id g7MDVkU02863 for ; Thu, 22 Aug 2002 17:31:46 +0400 Message-ID: <000801c249e1$ecc025c0$3a00a8c0@jippy> From: "Klimov Andrew" To: Subject: bytea ,etc. Date: Thu, 22 Aug 2002 17:43:37 +0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C24A03.71B04550" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/411 X-Sequence-Number: 9257 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C24A03.71B04550 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hi , All! Could someone clarify me : When I want to store BLOB's internally in database (for example jpeg ) should I use bytea or OID? Is OID something like BFILE in Oracle 8i? If both are appropriate why I can't use update image set picture=3Dlo_import('Myfile') where image_code=3D'blablabl= a'=20 with bytea column type but only with OID column type? And one more thing: Where is function byteain documented? TIA, Andrew. ------=_NextPart_000_0005_01C24A03.71B04550 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
Hi , All!
 
Could someone clarify me  :
 
When I want to store BLOB's internally in = database=20 (for example jpeg )
should I use bytea or OID? Is OID somethin= g like=20 BFILE in Oracle 8i?
If both are appropriate why I can't=20 use
update image set picture=3Dlo_import('Myfi= le') where=20 image_code=3D'blablabla'
with bytea column type but only with OID c= olumn=20 type?
 
And one more thing:
Where is function byteain documented?
 
TIA,
Andrew.
------=_NextPart_000_0005_01C24A03.71B04550-- From mail@joeconway.com Thu Aug 22 15:33:17 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7A1DB47603F for ; Thu, 22 Aug 2002 11:33:17 -0400 (EDT) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 93DFD47603B for ; Thu, 22 Aug 2002 11:33:16 -0400 (EDT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 1310835; Thu, 22 Aug 2002 08:20:43 -0700 Message-ID: <3D65040F.7010201@joeconway.com> Date: Thu, 22 Aug 2002 08:32:31 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Klimov Cc: pgsql-sql@postgresql.org Subject: Re: bytea etc. References: <20020822133416.86495.qmail@web20417.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/314 X-Sequence-Number: 9160 Andrew Klimov wrote: > When I want to store BLOB's internally in database (for example jpeg ) > should I use bytea or OID? Is OID something like BFILE in Oracle 8i? Bytea is a "normal" data type, stored in-line similar to text (it can actually be stored in an external toast table, but that's transparent to the user), whereas the large object interface has its own special access functions and maintains file-oriented access. See: http://www.postgresql.org/idocs/index.php?largeobjects.html for more info on large objects. > If both are appropriate for internal BLOB why I can't use > > update image set picture=lo_import('Myfile') where image_code='blablabla' ; > with bytea column type but only with OID column type? See above. The two are different. > And one more thing: > Where is function byteain documented? It's not, because you should never use it directly. You really need to spend some time reading the documentation. See: http://www.postgresql.org/idocs/index.php?datatype-binary.html for more info on bytea, and: http://www.postgresql.org/idocs/index.php?functions-binarystring.html for info on bytea specific functions. Joe