Re: [GENERAL] Using BLOBs with PostgreSQL
От | Bruce Momjian |
---|---|
Тема | Re: [GENERAL] Using BLOBs with PostgreSQL |
Дата | |
Msg-id | 200010091821.OAA22351@candle.pha.pa.us обсуждение исходный текст |
Список | pgsql-hackers |
> On Sat, 07 Oct 2000, Tim Kientzle wrote: > > > > I've been using MySQL for initial development; it has pretty > > clean and easy-to-use BLOB support. You just declare a BLOB > > column type, then read and write arbitrarily large chunks of data. > > In Perl, BLOB columns work just like varchar columns; in JDBC, > > the getBinaryStream()/setBinaryStream() functions provide support > > for streaming large data objects. > > If you're talking about BLOB texts, just declare the column as text and thats > all. In the case of binary data, I don't have an idea. I only work we text > data. [General CC removed, hackers CC added.] Yes, this opens a good question. We have long text fields, and bytea for binary input with escapes. As far as I know, we can store binary values in text fields, but we have no way of getting them in there via SQL queries (except for bytea using escapes for the binary values). Should be look at extending along some type of large-object style API to get binary values into these fields? Do we create a BLOB type that can take a file name like large objects? Seems we shouldn't use TEXT for binary if we can help it because it is confusing, and a BLOB type would allow selects on BLOB type to return nothing rather than blasting binary data into the user's terminal. When we had the 8k limit, no one would really wanted to store binary data in there because most binary values are >8k, but now that we can store them, should we make a way for users to get them into TOAST values. I have on the TODO list already: * Add non-large-object binary field -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: