On Wed, Aug 17, 2016 at 4:33 AM, Vince Vielhaber <v...@chives.michvhf.com> wrote: > > I recently moved a mybb forum away from mysql to postgres. Along the way I > encountered a couple of things that either didn't seem to be supported or > I'm just not doing it right. > > First, the server this is on is running version 8.4.22. php is 5.6.22.
8.4 is very old. It's been unsupported for two years already. You can't have joins in a DELETE -- which table would it actually delete from? You can use a subselect to do look up information from other tables in your delete though. EXTRACT and date_part have no idea where the data they're passed came from. They can come from tables or other functions or expressions. The error you quoted is indicating that dateline is of type integer however. The syntax for EXTRACT is confusing (blame the SQL committee...) but you don't want the extra "timestamp" keyword before the column there -- in the examples that's part of the literal being used to have it be read as a timestamp. https://www.postgresql.org/docs/8.4/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers