On Feb 13, 2008, at 2:53 PM, Koen Vermeer wrote:
I'll check to see what the options are for reading in the data in PHP.
Thanks for the help!
If you use prepared statements, you don't need to do anything special
at all for bytea with PHP. No worries about escaping and all that.
Using the
Op woensdag 13-02-2008 om 10:45 uur [tijdzone -0300], schreef Alvaro
Herrera:
> > Instead of base64 encoding, I guess it would be easier to just escape
> > the required bytes and store them in a bytea.
> Actually, if you have access to the pqExecParams() call, you can pass
> the bytes to a bytea co
Op woensdag 13-02-2008 om 15:21 uur [tijdzone +], schreef Peter
Wilson:
> > Right, so that basically means that when 'large objects' are files,
> > which should be saved and restored as a whole, it may be more natural to
> > use the large objects. I guess that applies to some uses of media
> >
Koen Vermeer wrote:
On Wed, 2008-02-13 at 09:35 +, Peter Wilson wrote:
My preference : if I don't need the file-like interface to large objects
I'd use BYTEA every time.
Right, so that basically means that when 'large objects' are files,
which should be saved and restored as a whol
Koen Vermeer wrote:
> The large-objects-are-actually-files thing applies to my situation, so
> unless there is some 'large objects are / will be deprecated' argument,
> I guess I stick with large objects.
Certainly there is no such argument.
--
Alvaro Herrerahttp
On Wed, 2008-02-13 at 09:35 +, Peter Wilson wrote:
> I've used both methods. The only real problem is that none of the
> trigger based replication schemes
> such as Slony can't deal with large objects.
I can live with that for now. If the project ever gets that big, I
probably need to rethink
Koen Vermeer wrote:
> Instead of base64 encoding, I guess it would be easier to just escape
> the required bytes and store them in a bytea.
Actually, if you have access to the pqExecParams() call, you can pass
the bytes to a bytea column unescaped, which AFAIK saves some processing
on both the cl
Koen Vermeer wrote:
Hi,
I would like to store binary data in a PostgreSQL database. The size of
the data is about 2 to 20 MB and is always stored or retrieved as a
block (i.e., I do not need to get only part of the data). As I
understand, I have two options for storing this data: As BYTEA or as
On Wed, 2008-02-13 at 09:57 +0100, Gevik Babakhani wrote:
> In hour case we where switching between databases so what I have done in the
> past was:
> For inserting:
> 1. create a TEXT column in my table. (In PG this can be 1GB in size)
> 2. read file contents in a buffer/string and Base64 encode
ject: Re: [GENERAL] Storing images as BYTEA or large objects
>
> On Tue, 2008-02-12 at 17:16 -0700, Leonel Nunez wrote:
> > > My two questions are: Is this summary correct? And: Which method
> > > should I choose?
> > With Java , Python , Perl you've got funct
On Tue, 2008-02-12 at 21:14 -0600, Andy Colson wrote:
> Having used the large objects, I can tell you they do backup (pg_dump,
> etc) and they are not hard to use. There is even a contrib that helps
> you hook them up to a table so they get deleted/etc at appropriate times
> (I have not used it
On Tue, 2008-02-12 at 17:16 -0700, Leonel Nunez wrote:
> > My two questions are: Is this summary correct? And: Which method should
> > I choose?
> With Java , Python , Perl you've got functions that escapes the data for
> you
What about C++ and PHP?
Koen
---(end of bro
On Wed, 2008-02-13 at 07:37 +0100, Gevik Babakhani wrote:
> Which programming language are you using?
That would be C++ for storing and both C++ and PHP for retrieving the
data. Maybe also PL/SQL for retrieval (in addition to or instead of
PHP).
Koen
---(end of broadcast
age-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Koen Vermeer
> Sent: Tuesday, February 12, 2008 11:41 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Storing images as BYTEA or large objects
>
> Hi,
>
> I would like to store binary data in
"Adam Rich" <[EMAIL PROTECTED]> writes:
>>> I have two options for storing this data: As BYTEA or as large objects.
> Is it true that if you update a row containing a large BYTEA value, (even if
> you're not updating the BYTEA field itself, just another field), it requires
> the entire BYTEA valu
> > I have two options for storing this data: As BYTEA or as large objects.
Is it true that if you update a row containing a large BYTEA value, (even if
you're not updating the BYTEA field itself, just another field), it requires
the entire BYTEA value to be copied to a new row (because of MVCC)
Koen Vermeer wrote:
Hi,
I would like to store binary data in a PostgreSQL database. The size of
the data is about 2 to 20 MB and is always stored or retrieved as a
block (i.e., I do not need to get only part of the data). As I
understand, I have two options for storing this data: As BYTEA or as
> Hi,
>
> I would like to store binary data in a PostgreSQL database. The size of
> the data is about 2 to 20 MB and is always stored or retrieved as a
> block (i.e., I do not need to get only part of the data). As I
> understand, I have two options for storing this data: As BYTEA or as
> large obj
Hi,
I would like to store binary data in a PostgreSQL database. The size of
the data is about 2 to 20 MB and is always stored or retrieved as a
block (i.e., I do not need to get only part of the data). As I
understand, I have two options for storing this data: As BYTEA or as
large objects. As I un
19 matches
Mail list logo