Move from MySQL to PostgreSQL

From: basti <mailinglist(at)unix-solution(dot)de>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Move from MySQL to PostgreSQL
Date: 2023-03-29 12:57:13
Message-ID: c925ef2b-59a3-7a80-0c05-c8a1f7cc806f@unix-solution.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, I try to move from MySQL to PostgreSQL.

All seems to work expect of one query.
The query is part of https://github.com/volkszaehler/volkszaehler.org

https://github.com/volkszaehler/volkszaehler.org/blob/master/lib/Util/Aggregation.php

There are several problems.

One of that ist the 'REPLACE INTO'.
An other problem is '@prev_timestamp := timestamp'

I have no idea how this can rewritten, so that MySQL and PostgreSQL can
understood that.
For DATE_FORMAT and UNIX_TIMESTAMP I have found wrapper functions.

Can someone please help me?

Best Regards,
Basti

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2023-03-29 13:34:29 Re: Move from MySQL to PostgreSQL
Previous Message Laurenz Albe 2023-03-29 11:08:34 Re: Using CTID system column as a "temporary" primary key