Re: BLOB support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BLOB support
Date
Msg-id 26289.1307369606@sss.pgh.pa.us
Whole thread Raw
In response to Re: BLOB support  (Radosław Smogura <rsmogura@softperience.eu>)
Responses Re: BLOB support
Re: BLOB support
List pgsql-hackers
Radosław Smogura <rsmogura@softperience.eu> writes:
>  I think more about this with contrast to sent references, but I still 
>  have in my mind construct
>  Blob myWeddingDvd = conn.createBlob(myWeddingStream, size); //A bit 
>  outdated we have BlueRay
>  conn.prepareStatemnt("INSERT INTO someonetubevideos values (?)")
>  where 1st parameter is myWeddingDvd,

Yes, if you insist upon designing the API like that, then you come to
the conclusion that you need global LOB identifiers.

However, there are many ways to design this that don't work that way.
One idea to think about is
insert into someonetubevideos values('')returning open_for_write(videocolumn)

which gives you back some kind of writable stream ID (this is a
transient, within-session ID, not global) for the target field in the
row you just inserted.

BTW, as was noted upthread by Dimitri, this whole subject has been
discussed before on pgsql-hackers.  You really ought to go re-read the
previous threads.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: WIP: AuthenticationMD5 protocol documentation clarification
Next
From: Simon Riggs
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch