Re: Are these supported?? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Are these supported??
Date
Msg-id CAM-w4HPrj+ECF_YYwLbtPGP4+VNrzept7HUeZV1AhEvEnriMiQ@mail.gmail.com
Whole thread Raw
In response to Are these supported??  (Vince Vielhaber <vev@chives.michvhf.com>)
Responses Re: Are these supported??  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Aug 17, 2016 at 4:33 AM, Vince Vielhaber <vev@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



pgsql-hackers by date:

Previous
From: amul sul
Date:
Subject: Re: Bug in to_timestamp().
Next
From: Craig Ringer
Date:
Subject: Re: Why we lost Uber as a user