Re: function to_char(unknown, unknown) is not unique

From: Bartosz Dmytrak <bdmytrak(at)gmail(dot)com>
To: Alex Bozhenko <alexbozhenko(at)gmail(dot)com>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: function to_char(unknown, unknown) is not unique
Date: 2012-12-10 11:59:06
Message-ID: CAD8_UcZn0b0Y_AO0s-3XzrcokonPWbzwkAc12KeYvm56ioSJMQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alex Bozhenko 2012-12-10 12:10:49 Re: function to_char(unknown, unknown) is not unique
Previous Message Alex Bozhenko 2012-12-10 11:53:19 function to_char(unknown, unknown) is not unique