CREATE TEMPORARY TABLE LIKE

From: Jim Vanns <jvanns(at)ilm(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: CREATE TEMPORARY TABLE LIKE
Date: 2023-05-25 13:06:50
Message-ID: CAH7vdhOrC4CN=P+hCD=bEpm68ZEAJOB6ZitQbJ22MqDABecRnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everyone,

When basing a temporary table of a source table, are triggers included
by default? I have this statement;

CREATE TEMPORARY TABLE dev_main (
LIKE prod_main
INCLUDING ALL
EXCLUDING INDEXES
EXCLUDING CONSTRAINTS
) ON COMMIT DELETE ROWS;

And wondering if there is a trigger (row-based after) on prod_main
it'll fire also on dev_main? I can't find anything in the
documentation that suggests either way nor can I see an explicit
EXCLUDING option to be sure triggers aren't copied.

Does anyone know?

Cheers,

Jim

--
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2023-05-25 13:10:42 Re: DB migration : Sybase to Postgres
Previous Message Erik Wienhold 2023-05-25 12:37:18 Re: Maintaining accents with "COPY" ?