Deleting records with text fields
Deleting records with text fields
От:
Kovács Péter <peter.kovacs@sysdata.siemens.hu>
Дата:
Hi, I read in this new group a short thread about deleting large objects through jdbc. From this thread I learned that if I delete a record with a large object field in it (I am using here a simplified formulation), the large object will not be deleted automatically with the record, but has to be deleted in a seperate operation. Instinctively, I would think that this kind of design was applied to the "text" type, since it also can accomodate data of practically (from my perspective) unlimited size. So should I do some extra work, when I want to get rid of a record containing a text field, or will deleting only the record also delete the text object represented by the text field in the record? Is the design for the "text" type different from large objects? Thank you Peter
Re: Deleting records with text fields
От:
Barry Lind <barry@xythos.com>
Дата:
Peter, LargeObjects are s special feature of PostgreSQL, the behavior of LargeObjects if very different from that of the regular datatypes. A column of type 'text' will work as one would expect. There is a difference between LargeObjects (a special datatype) and large objects (large amounts of data in a particular column). thanks, --Barry Kovács Péter wrote: > Hi, > > I read in this new group a short thread about deleting large objects through > jdbc. From this thread I learned that if I delete a record with a large > object field in it (I am using here a simplified formulation), the large > object will not be deleted automatically with the record, but has to be > deleted in a seperate operation. > > Instinctively, I would think that this kind of design was applied to the > "text" type, since it also can accomodate data of practically (from my > perspective) unlimited size. So should I do some extra work, when I want to > get rid of a record containing a text field, or will deleting only the > record also delete the text object represented by the text field in the > record? Is the design for the "text" type different from large objects? > > Thank you > > Peter > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >
Re: Deleting records with text fields
От:
Rene Pijlman <rene@lab.applinet.nl>
Дата:
On Wed, 7 Nov 2001 08:56:59 +0100 , you wrote: >So should I do some extra work, when I want to >get rid of a record containing a text field, No, that's not necessary. >or will deleting only the record also delete the text object >represented by the text field in the record? Yes. In fact, there is no text object, just a text field which happens to be very large. >Is the design for the "text" type different from large objects? Yes. This was implemented in 7.1: http://postgresql.lerner.co.il/projects/devel-toast.html Regards, René Pijlman