From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
Cc: | DiasCosta <diascosta(at)diascosta(dot)org>, Łukasz Jarych <jaryszek(at)gmail(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-09 23:53:51 |
Message-ID: | 8d9c5213-3b73-faaa-a2b5-9e17b1ee7585@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 07/09/2018 03:23 PM, Adrian Klaver wrote:
> On 07/09/2018 02:50 PM, Melvin Davidson wrote:
>>
>> Adrian,
>
> The problem is that the relname/object has changed in the new schema. In
> this case from text_idx --> idx_test_id_idx. So this happens:
>
> test_(postgres)# comment on index sch_test.test_idx is 'test';
> ERROR: relation "sch_test.test_idx" does not exist
>
>
> Just some muddling do with it what you will:)
>
Should have added to the above that INCLUDING ALL encompasses INCLUDING
COMMENTS:
https://www.postgresql.org/docs/10/static/sql-createtable.html
"Comments for the copied columns, constraints, and indexes will be
copied only if INCLUDING COMMENTS is specified. The default behavior is
to exclude comments, resulting in the copied columns and constraints in
the new table having no comments."
So the COMMENT ON INDEX code is redundant anyway.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Shawn Mulloney | 2018-07-10 00:58:53 | Reconnecting a slave to a newly-promoted master |
Previous Message | Melvin Davidson | 2018-07-09 23:52:19 | Re: Cloning schemas |