On Wed, 30 Jul 2003, Guillaume Houssay wrote: > I am looking for the SQL query to add a column in a table and having > the column at specific position in the table (not at the end of the > table). > > Do you have any idea ? I think that's a TODO item (i.e. it's not implemented yet.) Currently you'd have to either pg_dump and rearrange your data, or recreate the table with a select into / insert from select type thing. select field1, field2, field4, ''::text as newfield, field3 into newtable from oldtable;
On Wednesday 30 July 2003 17:21, Guillaume Houssay wrote: > I am looking for the SQL query to add a column in a table and having the > column at specific position in the table (not at the end of the table). Sorry - you'll need to dump and restore the table. PG only adds columns at the end. -- Richard Huxton Archonet Ltd
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера