pg_dump/restore to convert BLOBs to LZTEXT (optional!)
От | Philip Warner |
---|---|
Тема | pg_dump/restore to convert BLOBs to LZTEXT (optional!) |
Дата | |
Msg-id | 3.0.5.32.20000804105402.0227d300@mail.rhyme.com.au обсуждение исходный текст |
Ответы |
Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!)
|
Список | pgsql-general |
Now that I *seem* to have a pg_dump/restore that handles BLOBs (for 7.0.2 and 7.1), would there be any value in adding a 'conversion' option to pg_restore (for 7.1)? The idea being that there are probably people out there who use BLOBs for large text fields, who *might* be better served is using LZTEXT (or whatever is appropriate) in 7.1. At this stage I am not sure *how* I would do the conversion, but my initial thought would be to store the BLOB as an LZTEXT in a temp table, then find all tables with BLOB columns, either do an ALTER TABLE ALTER COLUMN <name> LZTEXT (if supported?), or just add a new column? Then set the column value to the new LZTEXT. Another option would be to do 'alter table add <newname> lztext', then load the data, drop the old column and rename the new one... For BLOBS that are referenced in more than one table, this will duplicate the text which may be a problem, but this is only enforcing what should have been the case all along, I think. I'd be interested in feedback from people who think this would be a good/bad idea as well as any ideas on how to implement it nicely... ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.C.N. 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
В списке pgsql-general по дате отправления: