Re: column "id" is of type integer but expression is of type character
В списке pgsql-general по дате отправления:
| От | Richard Huxton |
|---|---|
| Тема | Re: column "id" is of type integer but expression is of type character |
| Дата | |
| Msg-id | 49665106.4070102@archonet.com обсуждение исходный текст |
| Ответ на | column "id" is of type integer but expression is of type character ("Andrus" <kobruleht2@hot.ee>) |
| Ответы |
Re: column "id" is of type integer but expression is of type character
|
| Список | pgsql-general |
Andrus wrote: > Commands: > > create temp table test ( id int, baas char(10) ); > create temp table lisa ( id int, baas char(10) ); > alter table lisa drop column id; > INSERT INTO test SELECT * FROM lisa; > drop table lisa; > > Cause error > > ERROR: column "id" is of type integer but expression is of type character > HINT: You will need to rewrite or cast the expression. > How to fix ? Don't use SELECT * - list the columns you want to insert. I can't think why you would do that (you'll end up with nulls in the id column) but it will work. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера