Re: Cloning schemas - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Cloning schemas
Date
Msg-id CANu8FizwHA5qDrS8do2kVR7oEcCCdy4V7HXHd9OLgHo23YXztA@mail.gmail.com
Whole thread Raw
In response to Re: Cloning schemas  (Łukasz Jarych <jaryszek@gmail.com>)
Responses Re: Cloning schemas  (Łukasz Jarych <jaryszek@gmail.com>)
Re: Cloning schemas  (DiasCosta <diascosta@diascosta.org>)
List pgsql-general



ERROR: BŁĄD: you cannot add to column "TopoToVersion_ID" DETAIL: Column "TopoToVersion_ID" is an identity column defined as GENERATED ALWAYS. HINT: Use OVERRIDING SYSTEM VALUE to override. CONTEXT: wyrażenie SQL "INSERT INTO version4.t_topotoversions SELECT * FROM public.t_topotoversions;" funkcja PL/pgSQL clone_schema(text,text,boolean), wiersz 212 w EXECUTE

Lukasz,
That ERROR is occuring because you choose to copy the data (include_recs = TRUE).
I have added OVERRIDING SYSTEM VALUE to the insert statement and attached revised version.
CAUTION: The value of TopoToVersion_ID and any other IDENTITY columns may be changed.

The revised version is attached.

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: problem wirh irc ffreenode
Next
From: Paula Kirsch
Date:
Subject: Question on the right way to think about order by