Search Postgresql Archives

Re: date with month and year

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/21/2015 09:04 PM, Alvaro Herrera wrote:
Adrian Klaver wrote:

SELECT
     extract (
         YEAR
     FROM
         school_day ) AS YEAR,

Reformatting courtesy of pgFormatter(http://sqlformat.darold.net/).

FWIW I think this indenting of FROM inside an extract() call is odd and
ugly --- probably just an accident resulting from dealing with the
regular FROM clause.  It seems to me that the "YEAR FROM school_day"
part should be considered a single argument instead of breaking it in
multiple lines.

Probably so, but the output is a lot cleaner then what I did in psql. The author of pgFormatter will be interested in your comments:

https://github.com/darold/pgFormatter

--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux