Re: postgres blobs and PHP
От | Martin A. Marques |
---|---|
Тема | Re: postgres blobs and PHP |
Дата | |
Msg-id | Pine.LNX.4.10.10012040828290.20762-100000@math.unl.edu.ar обсуждение исходный текст |
Ответ на | Re: postgres blobs and PHP (Adam Haberlach <adam@newsnipple.com>) |
Список | 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@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------
В списке pgsql-general по дате отправления: