Re: Resolve iso-8859-1 type to relevant type instead of text type while bulk update using values

Поиск
Список
Период
Сортировка
От Sayyid Ali Sajjad Rizavi
Тема Re: Resolve iso-8859-1 type to relevant type instead of text type while bulk update using values
Дата
Msg-id CAHxW8BCw5vOTsmd=XKYSM+vX4qsOXqhz+r9KWOS_7jNMs6q0uw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Resolve iso-8859-1 type to relevant type instead of text type while bulk update using values  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Resolve iso-8859-1 type to relevant type instead of text type while bulk update using values  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
Breaking working queries for this is not acceptable.

Good point, let's exclude Option 2.
 
This happens when possible so any remaining cases are not possible.  Or, at least apparently not worth the effort it would take to make work.
 
Actually this doesn't happen when all of the values in that position are null. Or maybe I don't understand what you mean.
If we don't consider the effort it would take to make it work, do you think Option 1 would be good to have? Because when I
have an integer column in that position, I wouldn't want the unknown (null) values I supply to be resolved to `text` type.


On Thu, Jan 5, 2023 at 11:23 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, January 4, 2023, Sayyid Ali Sajjad Rizavi <sasrizavi@gmail.com> wrote:

Option 1: Cast to the relevant column type in that position (to `integer` in this case), whenever we have an unknown type.

This happens when possible so any remaining cases are not possible.  Or, at least apparently not worth the effort it would take to make work.
 
Option 2: Always give error if unknown type is not casted to desired type (`null::integer` will be necessary).

Breaking working queries for this is not acceptable.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Resolve iso-8859-1 type to relevant type instead of text type while bulk update using values
Следующее
От: Amit Langote
Дата:
Сообщение: Re: on placeholder entries in view rule action query's range table