Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjMYR-0002sF-57 for pgsql-general@arkaria.postgresql.org; Fri, 05 Jul 2019 11:39:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjMYP-0001i1-Bl for pgsql-general@arkaria.postgresql.org; Fri, 05 Jul 2019 11:39:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjMYP-0001ak-0P for pgsql-general@lists.postgresql.org; Fri, 05 Jul 2019 11:39:01 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjMYK-0006pF-UM for pgsql-general@postgresql.org; Fri, 05 Jul 2019 11:39:00 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 3ABAA15483DB6 for ; Fri, 5 Jul 2019 04:38:54 -0700 (MST) Date: Fri, 5 Jul 2019 04:38:54 -0700 (MST) From: PegoraroF10 To: pgsql-general@postgresql.org Message-ID: <1562326734199-0.post@n3.nabble.com> In-Reply-To: <9dcaef4ca4f464078c22d4658eabd6baf43f9940.camel@cybertec.at> References: <1562269287792-0.post@n3.nabble.com> <9dcaef4ca4f464078c22d4658eabd6baf43f9940.camel@cybertec.at> Subject: Re: Converting to identity columns with domains on PK columns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Well, I think it=C2=B4ll not as easy as you said. That tables has dependenc= ies. So, if I try to alter type it gives me ERROR: cannot alter type of a column used in a trigger definition. I dropped all Triggers of that table and it gives me ERROR: cannot alter type of a column used by a view or rule.=20 Then, if I need to drop everything to change that thing I think is better just have an empty structure and copy entire database data to it.=20 And why do we used domains, because we were Firebird and on that database a integer or a domain based on an integer is the same, so we converted to Postgres using that way.=20 Thanks -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.ht= ml