Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist
Дата
Msg-id 1109902.1682604682@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re:Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist  (gzh <gzhcoder@126.com>)
Ответы Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist  (gzh <gzhcoder@126.com>)
Список pgsql-general
gzh  <gzhcoder@126.com> writes:
> I did the following two tests and found that the return value of pg_catalog.date and oracle.date are inconsistent.

Yeah ... that's pretty much the point.  Oracle uses the name "date"
for a data type that Postgres (and the SQL standard) calls a "timestamp".
That's very ancient on their side and I doubt they'll ever change it.

If you're porting a bunch of code written for Oracle to Postgres,
you'd have to run around and change every occurrence of "date" to
"timestamp" ... unless you install orafce, in which case you can
rely on this alias type that orafce creates.  But you do then have
two types named "date" in the system, so you have to be careful
about search_path settings or you'll get more confusion than it's
worth.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Re:Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist
Следующее
От: Michael Xu
Дата:
Сообщение: Postgres query doesn't accept double quote around schema name in query statement