Re: function to_char(unknown, unknown) is not unique - Mailing list pgsql-novice

From Bartosz Dmytrak
Subject Re: function to_char(unknown, unknown) is not unique
Date
Msg-id CAD8_UcZn0b0Y_AO0s-3XzrcokonPWbzwkAc12KeYvm56ioSJMQ@mail.gmail.com
Whole thread Raw
In response to function to_char(unknown, unknown) is not unique  (Alex Bozhenko <alexbozhenko@gmail.com>)
Responses Re: function to_char(unknown, unknown) is not unique
List pgsql-novice
hi,
try SELECT  to_char(null::date, 'DD.MM.YYYY')::text or SELECT  to_char(null::timestamp, 'DD.MM.YYYY')::text

should work.
It is not possible to guess type of null without explicit cast.

Regards,
Bartek

pgsql-novice by date:

Previous
From: Alex Bozhenko
Date:
Subject: function to_char(unknown, unknown) is not unique
Next
From: Alex Bozhenko
Date:
Subject: Re: function to_char(unknown, unknown) is not unique