Re: inserting a NULL timestamp
От
Steve Crawford
Тема
Re: inserting a NULL timestamp
Дата
Msg-id
4D921262.9070508@pinpointresearch.com
Ответ на
inserting a NULL timestamp (Robert Poor)
Список
Дерево обсуждения
inserting a NULL timestamp Robert Poor <rdpoor@gmail.com>
Re: inserting a NULL timestamp Steve Crawford <scrawford@pinpointresearch.com>
Re: inserting a NULL timestamp Robert Poor <rdpoor@gmail.com>
On 03/29/2011 10:03 AM, Robert Poor wrote: > . > > # INSERT INTO service_bills (cost,start_time) > SELECT candidates.* > FROM (SELECT 2.3 AS cost, NULL AS start_time) AS candidates; > > This, though, raises an error: > > # ERROR: failed to find conversion function from unknown to timestamp > without time zone > > So: What's so different about the second version? It's the select part that is causing your trouble. Try casting the null to a timestamp: ...as cost, null::timestamp as start_time... Cheers, Steve
В списке pgsql-novice по дате отправления