Re: Semantics around INSERT INTO with SELECT and ORDER BY.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Steve Krenzel <sgk284(at)gmail(dot)com>
Cc: "sravikrishna3(at)gmail(dot)com" <sravikrishna3(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Semantics around INSERT INTO with SELECT and ORDER BY.
Date: 2018-06-12 12:29:57
Message-ID: CAKFQuwZWFXPCN_kxhVqCL26OVkEGsrzCeM_NukxgfEZik55g7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, June 12, 2018, Steve Krenzel <sgk284(at)gmail(dot)com> wrote:

> This is relevant for tables that have a column with a SERIAL type, I need
> to guarantee that the relative ordering remains the same as the ordering of
> the selected result set.
>

The logical insertion order, and thus the sequence values, will be assigned
according to the order by.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-06-12 13:25:57 Re: Semantics around INSERT INTO with SELECT and ORDER BY.
Previous Message Daniel Verite 2018-06-12 11:32:05 Re: pg_upgrade and wraparound