pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
What happens if you delete a row containing a BLOB?
3+ messages / 3 participants
[nested] [flat]

* What happens if you delete a row containing a BLOB?
@ 2001-12-16 19:39  Terrence Brannon <metaperl@mac.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Terrence Brannon @ 2001-12-16 19:39 UTC (permalink / raw)
  To: pgsql-sql

If you delete a row with a BLOB, does it automatically lo_unlink 
the blob?

This was not clear when reading the section Large Objects (BLOBS) 
in the Momjian book.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: What happens if you delete a row containing a BLOB?
@ 2001-12-17 01:41  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Terrence Brannon <metaperl@mac.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2001-12-17 01:41 UTC (permalink / raw)
  To: Terrence Brannon <metaperl@mac.com>; +Cc: pgsql-sql


On Sun, 16 Dec 2001, Terrence Brannon wrote:

> If you delete a row with a BLOB, does it automatically lo_unlink
> the blob?

IIRC, no, you'd need to make triggers in order to do that.  One thing
to be careful with is making sure that you don't have multiple references
to the large object before unlinking it.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: What happens if you delete a row containing a BLOB?
@ 2001-12-17 02:44  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Terrence Brannon <metaperl@mac.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Christopher Kings-Lynne @ 2001-12-17 02:44 UTC (permalink / raw)
  To: Terrence Brannon <metaperl@mac.com>; pgsql-sql

> If you delete a row with a BLOB, does it automatically lo_unlink
> the blob?

No, I believe it does not - you need to run an 'lo_delete' command
separately.  In Postgres 7.1+ though, I think it's easier to just use the
'bytea' binary large string type.  It's there in 7.1, but 7.2 has introduced
many new operators for it.

Chris




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-12-17 02:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-12-16 19:39 What happens if you delete a row containing a BLOB? Terrence Brannon <metaperl@mac.com>
2001-12-17 01:41 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-12-17 02:44 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox