Re: column "id" is of type integer but expression is of type character

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: column "id" is of type integer but expression is of type character
Дата
Msg-id 2076C91A287B48FF999F24914749E0E9@andrusnotebook
обсуждение исходный текст
Ответ на Re: column "id" is of type integer but expression is of type character  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
Ray,

> I don't think you can - here's what the docs[1] for INSERT say:
>
> <quote from docs>
> The target column names can be listed in any order. If no list of column
> names is given at all, the default is all the columns of the table in
> their declared order; or the first N column names, if there are only N
> columns supplied by the VALUES clause or query. The values supplied by
> the VALUES clause or query are associated with the explicit or implicit
> column list left-to-right.
> </quote from docs>
>
> So it seems that the association between columns is based on order, not
> on name.

Solution seems to force id column to be last column in table.
In this case drop column id drops last columns and insert should work.

Any idea how to force id to be last column in table ?
Is it possible to create updatable view where id is last column ?

Andrus.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Filip Rembiałkowski"
Дата:
Сообщение: Re: dblink between oracle and postgres?
Следующее
От: Andrej
Дата:
Сообщение: Re: Question about COPY command