pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Move from MySQL to PostgreSQL 2+ messages / 2 participants [nested] [flat]
* Move from MySQL to PostgreSQL @ 2023-03-29 12:57 basti <mailinglist@unix-solution.de> 2023-03-29 13:34 ` Re: Move from MySQL to PostgreSQL Thomas Kellerer <shammat@gmx.net> 0 siblings, 1 reply; 2+ messages in thread From: basti @ 2023-03-29 12:57 UTC (permalink / raw) To: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Move from MySQL to PostgreSQL 2023-03-29 12:57 Move from MySQL to PostgreSQL basti <mailinglist@unix-solution.de> @ 2023-03-29 13:34 ` Thomas Kellerer <shammat@gmx.net> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Kellerer @ 2023-03-29 13:34 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org basti schrieb am 29.03.2023 um 14:57: > https://github.com/volkszaehler/volkszaehler.org/blob/master/lib/Util/Aggregation.php > > There are several problems. > > One of that ist the 'REPLACE INTO'. Most probably INSERT ... ON CONFLICT > An other problem is '@prev_timestamp := timestamp' That's typically done with the lag() window function. No need for query variables. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-03-29 13:34 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-03-29 12:57 Move from MySQL to PostgreSQL basti <mailinglist@unix-solution.de> 2023-03-29 13:34 ` Thomas Kellerer <shammat@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox