Re: Are these supported??

From: Greg Stark <stark(at)mit(dot)edu>
To: Vince Vielhaber <vev(at)chives(dot)michvhf(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Are these supported??
Date: 2016-08-17 14:38:12
Message-ID: CAM-w4HPrj+ECF_YYwLbtPGP4+VNrzept7HUeZV1AhEvEnriMiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 17, 2016 at 4:33 AM, Vince Vielhaber <vev(at)chives(dot)michvhf(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-08-17 14:39:16 Re: Why we lost Uber as a user
Previous Message amul sul 2016-08-17 14:35:28 Re: Bug in to_timestamp().