От: Mavka
Тема: Date formatting
Дата: ,
Msg-id: 20160428110753.2700f00d@nikita_desk
(см: обсуждение, исходный текст)
Ответы: Re: Date formatting  ("Andrei M. Eichler")
Список: pgsql-docs

To convert a string to date I need to omit meaningless parts. I found
this format working well (Twitter dump format):

SELECT to_timestamp(
  'Tue Sep 24 08:56:18 +0000 2013',
  'xxx Mon DD HH24:MI:SS xxxxx YYYY'
)
-- 2013-09-24 08:56:18-07

In place of "xxx" I can use any non-reserved symbols, e.g.:

'aaa Mon DD HH24:MI:SS bbbbb YYYY'

Number of symbols can vary in some limits, e.g. 'aa' is still working.

Is it hack or normal behaviour of parser? I did not find any mention of
wildcards or placeholders in documentation:

http://www.postgresql.org/docs/9.5/static/functions-formatting.html

Best regards,
Mavka

P.S. I use PostgreSQL 9.4.



В списке pgsql-docs по дате сообщения:

От: Peter Eisentraut
Дата:
Сообщение: Re: 36.2 Visibility of Data Changes
От: Guillaume Lelarge
Дата:
Сообщение: Error in xindex.sgml