From: | mad rug <mad(dot)rug(dot)f(at)gmail(dot)com> |
---|---|
To: | rod(at)iol(dot)ie |
Cc: | pgadmin-support(at)postgresql(dot)org |
Subject: | Re: Viewing TEXT objects |
Date: | 2009-10-02 11:55:29 |
Message-ID: | ba6e95cf0910020455m8e83e16v2d3162d01225ffba@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
I really don't know. JDBC communication is being handled by a JDO library,
so I don't know which one is doing this, but I suspect about JDO. I feel
like asking about it in the forums there, but then I'd like to know: is
there any performance (disk, read/write speed...) difference between storing
large text data as TEXT and large object? I believe this indirection of
storing as large object could mean a small overhead, unless it is somehow
better using large objects (just then why use TEXT for some data that is
just a couple of chars?)
Thanks again!
On Fri, Oct 2, 2009 at 5:35 AM, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:
> On 01/10/2009 13:24, mad rug wrote:
> > CREATE TABLE "ABC" (
> > "DT" date NOT NULL,
> > "TXT" text NOT NULL
> > );
> > INSERT INTO "ABC" VALUES ('2009-07-27', '44828');
> > SET search_path = pg_catalog;
> > SELECT lo_open(lo_create(44828), 131072);
> > SELECT lowrite(0, 'all my text is here');
> > SELECT lo_close(0);
> > COMMIT;
> >
> > This seems to indicate that it is really some id being stored in that
> > column. I could correctly query the column data with this command:
> > SELECT "DT",loread(lo_open("TXT"::int, 131072), 999999999) from "ABC"
>
> Actually, your text data is apparently being stored as large objects,
> rather than being inserted directly into the text column. So it may
> indeed be JDBC doing something funny.
>
> I don't know anything about JDBC or PG's large objects (and not a whole
> lot about Java either), but I wonder if something is telling JDBC that
> the data is binary, rather than just plain text?
>
> Ray.
>
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod(at)iol(dot)ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Samokhin | 2009-10-02 12:12:36 | Per-function configuration parameters loss |
Previous Message | mad rug | 2009-10-01 12:24:46 | Re: Viewing TEXT objects |