From: Joe Conway <mail@joeconway.com>
To: Andrew Klimov <and_k_98@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: bytea etc.
Date: Thu, 22 Aug 2002 08:32:31 -0700
Message-ID: <3D65040F.7010201@joeconway.com> (raw)
References: <20020822133416.86495.qmail@web20417.mail.yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, and_k_98@yahoo.com
Subject: Re: bytea etc.
In-Reply-To: <3D65040F.7010201@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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