Re: Possible bug on insert
От | Rick Gigger |
---|---|
Тема | Re: Possible bug on insert |
Дата | |
Msg-id | 019b01c38c43$d15c9930$0700a8c0@trogdor обсуждение исходный текст |
Ответ на | Generating a SQL Server population routine (Martin_Hurst@dom.com) |
Ответы |
Re: Possible bug on insert
|
Список | pgsql-general |
What was it that changed in 7.3 that made this behavior change. (it worked in 7.2) Thanks, Rick Gigger ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "Rick Gigger" <rick@alpinenetworking.com> Cc: <pgsql-general@postgresql.org> Sent: Monday, October 06, 2003 1:04 PM Subject: Re: [GENERAL] Possible bug on insert > "Rick Gigger" <rick@alpinenetworking.com> writes: > > insert into bugtest (a) select '1' union select '1'; -- this one fails > > > Is this a bug? > > No. It's unfortunate perhaps, but it's not a bug. The UNION forces us > to make a decision about the output datatype of the UNION operation. > In your other cases the chosen datatype is integer, which can later be > cast to smallint for the insert, but in this case the chosen datatype is > text, which is not implicitly castable to smallint. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend >
В списке pgsql-general по дате отправления: