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

From Alex Bozhenko
Subject Re: function to_char(unknown, unknown) is not unique
Date
Msg-id CAC-xioJAoc9tMRGdSCS4u-Q-82HVyyrgBN=zE=PGu6dkQ4fMKw@mail.gmail.com
Whole thread Raw
In response to Re: function to_char(unknown, unknown) is not unique  (Bartosz Dmytrak <bdmytrak@gmail.com>)
List pgsql-novice
Ok, i have understand.

Select from table works because of type date of  column.

Thanks!



2012/12/10 Bartosz Dmytrak <bdmytrak@gmail.com>
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: Bartosz Dmytrak
Date:
Subject: Re: function to_char(unknown, unknown) is not unique
Next
From: Manning John
Date:
Subject: Calling PQconnectdb from an .so on a hardened SLES 11