Re: delete query using CTE

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Roger Bos <roger(dot)bos(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: delete query using CTE
Date: 2022-03-13 14:50:00
Message-ID: CAHOFxGqTfxoSJiyH2aHYrA6GcZ45p5fedPqXEKv4HOcrEohz3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can't delete rows that are in a CTE. You want to delete rows that are
in the table. Do you have a primary key that you can reference? Else, you
may need to reference the system column ctid.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2022-03-13 14:52:07 Re: delete query using CTE
Previous Message Roger Bos 2022-03-13 14:44:14 delete query using CTE