Re: Cloning schemas

From: DiasCosta <diascosta(at)diascosta(dot)org>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>, Łukasz Jarych <jaryszek(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cloning schemas
Date: 2018-07-04 18:48:20
Message-ID: dc9c8e39-6b3a-dce3-c51b-c31ef0dffb4e@diascosta.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-07-04 19:36:48 Re: Unable to Connect to DB Instance
Previous Message Melvin Davidson 2018-07-04 18:38:53 Re: Cloning schemas