From: DiasCosta <diascosta@diascosta.org>
To: Melvin Davidson <melvin6925@gmail.com>
To: Łukasz Jarych <jaryszek@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org >> PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Cloning schemas
Date: Wed, 4 Jul 2018 19:48:20 +0100
Message-ID: <dc9c8e39-6b3a-dce3-c51b-c31ef0dffb4e@diascosta.org> (raw)
In-Reply-To: <CANu8FizwHA5qDrS8do2kVR7oEcCCdy4V7HXHd9OLgHo23YXztA@mail.gmail.com>
References: <CAGv31ofHAE49iTQ4_Q_AiTduoVscQWXKfZanYU0yQP8HyxPJvQ@mail.gmail.com>
<63460.1530538220@sss.pgh.pa.us>
<CAGv31od+cuXFttW4FmVGPBJBvjbNBpwgeuhNKfDmqLGqyQMY-Q@mail.gmail.com>
<c941ac40-83cb-9d7b-e0f5-82f48f98cd95@aklaver.com>
<CAGv31odxm_oYK77sdByTh=i-u-5_13CCz2nGTie4mgnovcdM2Q@mail.gmail.com>
<CANu8FizWiVke-W7j2a-JMKxVwhFUOGjAUnX756Jt5jOJdFnD5A@mail.gmail.com>
<CAGv31odHuHpY3N8U3eyzOK8qCjdoxu78gTovuxKoKNsyb+5QOA@mail.gmail.com>
<CANu8FizwHA5qDrS8do2kVR7oEcCCdy4V7HXHd9OLgHo23YXztA@mail.gmail.com>
Hi Melvin,
I'm new to clone_schema.
Can I use it on PostgreSQL 9.6?
TIA
DCosta
On 03-07-2018 14:34, Melvin Davidson wrote:
>
>
>
> 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.
>
--
J. M. Dias Costa
Telef. 214026948 Telem. 939307421
Se divulgar esta mensagem por terceiros, por favor:
1. Apague o meu endereço de correio electrónico e o meu nome.
2. Apague também os endereços dos seus amigos antes de distribuir.
3. Enderece como cópia oculta (Cc ou Bcc) para os SEUS destinatários.
Agindo deste modo, dificultará a disseminação de "vírus", "spams" e
"banners" e contribuirá para manter a privacidade de todos e cada um.
Obrigado.
Nota: Não se deverá ao acaso a ocorrência de palavras na minha escrita que não respeitem o
malfadado acordo ortográfico.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: diascosta@diascosta.org, melvin6925@gmail.com, jaryszek@gmail.com, adrian.klaver@aklaver.com
Subject: Re: Cloning schemas
In-Reply-To: <dc9c8e39-6b3a-dce3-c51b-c31ef0dffb4e@diascosta.org>
References: <CAGv31ofHAE49iTQ4_Q_AiTduoVscQWXKfZanYU0yQP8HyxPJvQ@mail.gmail.com> <63460.1530538220@sss.pgh.pa.us> <CAGv31od+cuXFttW4FmVGPBJBvjbNBpwgeuhNKfDmqLGqyQMY-Q@mail.gmail.com> <c941ac40-83cb-9d7b-e0f5-82f48f98cd95@aklaver.com> <CAGv31odxm_oYK77sdByTh=i-u-5_13CCz2nGTie4mgnovcdM2Q@mail.gmail.com> <CANu8FizWiVke-W7j2a-JMKxVwhFUOGjAUnX756Jt5jOJdFnD5A@mail.gmail.com> <CAGv31odHuHpY3N8U3eyzOK8qCjdoxu78gTovuxKoKNsyb+5QOA@mail.gmail.com> <CANu8FizwHA5qDrS8do2kVR7oEcCCdy4V7HXHd9OLgHo23YXztA@mail.gmail.com> <dc9c8e39-6b3a-dce3-c51b-c31ef0dffb4e@diascosta.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox