Nevermind, got the answer here: http://stackoverflow.com/questions/17638774/syntax-error-at-or-near-on -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general