Re: Problem inserting data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem inserting data
Дата
Msg-id 17755.1213973846@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem inserting data  (Adrian Klaver <aklaver@comcast.net>)
Список pgsql-sql
Adrian Klaver <aklaver@comcast.net> writes:
> Two options:
> 1) Change the column in Postgres to an integer type.
> 2) Change the assignment in pg_cast from explicit  to implied for the 
> int4,bool cast. See for more details:
> http://www.postgresql.org/docs/8.3/interactive/catalog-pg-cast.html

Making it an assignment cast would be sufficient for the particular
case shown, and would be less likely to introduce surprising behavior
elsewhere.

Of course, depending on how thoroughly the application confuses int
and bool, you might be stuck with using the implicit cast.  But it's
a bit scary.  I think I'd look at option (1) before trying (2) with an
implicit cast.
        regards, tom lane


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Problem inserting data
Следующее
От: Tk421
Дата:
Сообщение: Re: Problem inserting data