| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Alter definition of a column |
| Дата | |
| Msg-id | 20070119141800.GB10356@svana.org обсуждение |
| Ответ на | Re: Alter definition of a column (af300wsm@gmail.com) |
| Ответы |
Re: Alter definition of a column
|
| Список | pgsql-general |
On Thu, Jan 18, 2007 at 06:27:04AM -0800, af300wsm@gmail.com wrote: > ksherlock@gmail.com wrote: > > Using ALTER TABLE <table> ALTER <field> TYPE VARCHAR(<newsize>) to > > change the size requires scanning the entire table. For large tables, > > this will be much slower than the pg_attribute query. Both will get > > the job done. > > Thanks. Am I correct in assuming that this scanning of the entire > table is done when I use the 'ALTER TABLE' command and not something I > must do after it's done? ALTER TABLE, to be correct, actually has to check the entire table to make sure it's ok. By doing it directly you're basically telling the DB it's OK. For making a varchar column longer it's safe though, and the easiest way. Have a ncie day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера