pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
bytea etc.
3+ messages / 3 participants
[nested] [flat]

* bytea etc.
@ 2002-08-22 13:34  Andrew Klimov <and_k_98@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andrew Klimov @ 2002-08-22 13:34 UTC (permalink / raw)
  To: pgsql-sql

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* bytea ,etc.
@ 2002-08-22 13:43  Klimov Andrew <klimov@fotobank.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Klimov Andrew @ 2002-08-22 13:43 UTC (permalink / raw)
  To: pgsql-sql

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=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.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: bytea etc.
@ 2002-08-22 15:32  Joe Conway <mail@joeconway.com>
  parent: Andrew Klimov <and_k_98@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Joe Conway @ 2002-08-22 15:32 UTC (permalink / raw)
  To: Andrew Klimov <and_k_98@yahoo.com>; +Cc: pgsql-sql

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






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-08-22 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-22 13:34 bytea etc. Andrew Klimov <and_k_98@yahoo.com>
2002-08-22 15:32 ` Joe Conway <mail@joeconway.com>
2002-08-22 13:43 bytea ,etc. Klimov Andrew <klimov@fotobank.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox