Обсуждение: Large Object questions...

Поиск
Список
Период
Сортировка

Large Object questions...

От
Howie
Дата:
im in the process of converting a client from mysql to postgres.  this
client has been storing images ( jpegs, gifs ) in their mysql database in
a BLOB field.  the image is then shown to their staff via the web.  oddly
enough, no, its not porn.

so, in the process of doing all these massive imports and exports, i think
i stumbled across a bug ( or what i think is a bug ) in postgres 6.5.  as
i said, there are a bunch of these images imported via lo_import().  when
doing a 'delete from <table 'holding' the images>', all the rows are
wiped... but the images imported via lo_import() are still in the
database's directory ( xinv* ).  they're also still in the pg_type table.

shouldnt the oid's ( and their corresponding xinv* files ) have been
removed when i deleted the rows from the table?  how does one remove these
large objects from both the pg_type table and the disk ( removing the
xinv* files ) ?

---
Howie <caffeine@toodarkpark.org>   URL: http://www.toodarkpark.org
"The distance between insanity and genius is measured only by success."



Re: [GENERAL] Large Object questions...

От
William Drury
Дата:
I have never understood why people would store binary data in an SQL
database.  Am I missing something?

On Fri, 30 Jul 1999, Howie wrote:

>
> im in the process of converting a client from mysql to postgres.  this
> client has been storing images ( jpegs, gifs ) in their mysql database in
> a BLOB field.  the image is then shown to their staff via the web.  oddly
> enough, no, its not porn.
>
> so, in the process of doing all these massive imports and exports, i think
> i stumbled across a bug ( or what i think is a bug ) in postgres 6.5.  as
> i said, there are a bunch of these images imported via lo_import().  when
> doing a 'delete from <table 'holding' the images>', all the rows are
> wiped... but the images imported via lo_import() are still in the
> database's directory ( xinv* ).  they're also still in the pg_type table.
>
> shouldnt the oid's ( and their corresponding xinv* files ) have been
> removed when i deleted the rows from the table?  how does one remove these
> large objects from both the pg_type table and the disk ( removing the
> xinv* files ) ?
>
> ---
> Howie <caffeine@toodarkpark.org>   URL: http://www.toodarkpark.org
> "The distance between insanity and genius is measured only by success."
>
>
>