From: | "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar> |
---|---|
To: | Adam Haberlach <adam(at)newsnipple(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgres blobs and PHP |
Date: | 2000-12-04 11:35:24 |
Message-ID: | Pine.LNX.4.10.10012040828290.20762-100000@math.unl.edu.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 1 Dec 2000, Adam Haberlach wrote:
> On Fri, Dec 01, 2000 at 07:30:19PM -0300, Martin A. Marques wrote:
> > I know I bothered with this, but I just don't get it.
> > Lets say I have a test table like this in a certain database:
> >
> > CREATE TABLE test (
> > id_test SERIAL,
> > blob_text oid
> > );
> >
> > Now I want to insert a good chunk of text in the blob_text field with PHP.
> > PHP has some postgres functions like pg_locreate, pg_lowrite, pg_loread, etc,
> > but it never specifies the table and it doesn't specify the field in the
> > table.
> > Now how does php know where to write the chunk of text (or the image, or
> > whatever)?
> > Can someone give me a hand?
>
> It sticks it somewhere. It is up to you to keep track of the Oid that
> lo_create gives you and stash it in your table so you can lo_open it later.
Maybe I wasn't clear enough. I don't see anything related with the oid
field in the lo functions of PHP.
I have done lots of stuffs with PHP and informix, and I think the way
PHP manages the informix blobs is much clearer. I don't know if it's
because of the way informix adds information to the blobs, or that the
guy that made the module had a good idea.
Anyway, I'm still clue-less!
P.D.: If I have to add BIG chunks of text to a database TEXT field, now
a days I would have trouble with Postgres 7.0.x because of the 8k per
tuple limitation. Will this be the same in future 7.1 version? I mean,
will the limitation grow higher, or will it disapear?
Saludos... ;-)
"And I'm happy, because you make me feel good, about me." - Melvin Udall
-----------------------------------------------------------------
Martín Marqués email: martin(at)math(dot)unl(dot)edu(dot)ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Vince Vielhaber | 2000-12-04 12:01:10 | Re: Your RDBMS Survey ... |
Previous Message | Bruno Dickhoff | 2000-12-04 09:53:37 | Re: Re[2]: [Please vote for postgresql!!!] |