incorporating APLAWS patch
r1682 | chrisg23 | 2007-10-04 14:06:20 +0200 (Do, 04 Okt 2007) the previous sql only works in Postgres 8.x - this version is ok for 7,x too git-svn-id: https://svn.libreccm.org/ccm/trunk@33 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
8dc70d5a42
commit
8dc90db636
|
|
@ -13,4 +13,27 @@
|
|||
-- License along with this library; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
--
|
||||
alter table messages alter body type text;
|
||||
-- NOTE - easier version: alter table messages alter column body type text;
|
||||
-- only works for Postgres 8.x
|
||||
|
||||
|
||||
|
||||
|
||||
alter table messages add large_body text;
|
||||
|
||||
update messages set large_body = body;
|
||||
|
||||
alter table messages drop column body;
|
||||
|
||||
alter table messages rename column large_body to body;
|
||||
|
||||
commit;
|
||||
|
||||
-- reclaim disk space from old column
|
||||
|
||||
UPDATE messages SET body = body;
|
||||
|
||||
VACUUM FULL messages;
|
||||
|
||||
commit;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue