Re: "reverse" (?) UPSERT -- how to ?

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: "reverse" (?) UPSERT -- how to ?
Дата
Msg-id ZdD5CC-6ljcCPoGe@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: "reverse" (?) UPSERT -- how to ?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Am Sat, Feb 17, 2024 at 08:55:57AM -0800 schrieb Adrian Klaver:

> >Dear list members,
> >
>
> >So, is this doable within one SQL statement (short of
> >creating and running the abovementioned function in
> >one go ;-) ?
>
> Don't know what version of Postgres you are on, assuming 15+ then maybe?:

Ah, sorry, I omitted that detail :(

Release target for new installs is current Debian Stable, IOW
Bookworm, which has PG 15.

    postgresql:
      Installiert:           15+248
      Installationskandidat: 15+248
      Versionstabelle:
         16+257 500
            500 https://deb.debian.org/debian testing/main i386 Packages
     *** 15+248 990
            990 https://deb.debian.org/debian bookworm/main i386 Packages
            100 /var/lib/dpkg/status


However, legacy deployments may run, say PG 13,

    root@hermes:~/bin# rmadison postgresql
    postgresql | 11+200+deb10u5 | oldoldstable | all
    postgresql | 13+225+deb11u1 | oldstable    | all
    postgresql | 15+248         | stable       | all
    postgresql | 16+257         | testing      | all
    postgresql | 16+257         | unstable     | all

so ideally it would work on that, too. However, it does not
seem too much to ask to *upgrade* GNUmed database servers to
Debian *Stable* if on plans on running the next,
as-yet-unreleased version ;-)

> MERGE
>
> https://www.postgresql.org/docs/current/sql-merge.html

:-)   I knew I missed something. As Greg also pointed out
that is what I need.

Thanks !
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Version 6 binaries for RHEL 7
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: "reverse" (?) UPSERT -- how to ?