Neanderthelle Jones writes:
> On Sun, 12 Aug 2012, Tom Lane wrote:
>> That script looks reasonable enough, if perhaps not too fast. Are you
>> sure the table actually does reference live large objects?
> What does "live" mean?
Well, my point is that the OIDs in the table are just numbers. They
On Sun, 12 Aug 2012, Tom Lane wrote:
> Neanderthelle Jones writes:
> > One attempt. Is the error mine or PostgreSQL's?
>
> > $ for i in $(psql -q -t -U elle -d my_db \
> > -c "SELECT raster FROM images where raster > 0"); do
> > echo $i
> > psql -q -U elle -d my_db -c "SELECT lo_unlink($i)"
>
Neanderthelle Jones writes:
> One attempt. Is the error mine or PostgreSQL's?
> $ for i in $(psql -q -t -U elle -d my_db \
> -c "SELECT raster FROM images where raster > 0"); do
> echo $i
> psql -q -U elle -d my_db -c "SELECT lo_unlink($i)"
> done
> 21234
> ERROR: large object 21234 does no
On Mon, 13 Aug 2012, Neanderthelle Jones wrote:
>
> $ for i in $(psql -q -t -U elle -d my_db \
> -c "SELECT raster FROM images where raster > 0"); do
> echo $i
> psql -q -U elle -d my_db -c "SELECT lo_unlink($i)"
> done
"BEGIN; SELECT lo_unlink($i); COMMIT" makes no difference.
--
Sent via
On Sun, 12 Aug 2012, Neanderthelle Jones wrote:
> I'd like to delete all the image files from a table by issuing an
> interactive psql command. Given
>
> CREATE TABLE image (
> name text,
> rast oid
> );
>
> with most tuples having images in rast, wanna do something like
>
> => sel
>
> select lo_unlink(rest) from image
>
> but i'm never used this function...
i've ...
-
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
If i where you i would try:
select lo_unlink(rest) from image
but i'm never used this function...
Neanderthelle Jones hat am 12. August 2012 um 12:16
geschrieben:
> I'd like to delete all the image files from a table by issuing an
> interactive psql command. Given
>
> CREATE TABLE image (
I'd like to delete all the image files from a table by issuing an
interactive psql command. Given
CREATE TABLE image (
name text,
rast oid
);
with most tuples having images in rast, wanna do something like
=> select lo_unlink('select rast from image');
Can such a thing be done,