Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFHzR-0004dP-Rz for pgsql-docs@arkaria.postgresql.org; Tue, 12 Mar 2013 05:43:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UFHzR-0001dk-32 for pgsql-docs@arkaria.postgresql.org; Tue, 12 Mar 2013 05:43:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFHzQ-0001de-3I for pgsql-docs@postgresql.org; Tue, 12 Mar 2013 05:43:08 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFHzL-0002jN-Qy for pgsql-docs@postgresql.org; Tue, 12 Mar 2013 05:43:05 +0000 Received: by mail-wg0-f45.google.com with SMTP id dq12so5893265wgb.24 for ; Mon, 11 Mar 2013 22:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=Kfi3wJB9btCLkkKhzKwioPMs9CqYNt7hdsdfxe0aicw=; b=HU7ybxGmmhLLfVfAlNInLcEkdBSA6kzj1atV63eaJtWjPohIYSW5iQGD4HXOM+fXEF LWFagqb2nAcF4+ZcbqYyll6ief4vZCbgrEAxpyEIPeGaFVfFgR3xoghm3ZlZVMcHBITX Sn21TXm8HwEdnQSuLXLpeCmAxHkm4pw4NB4F+mWfhKgwVgRVPZjrb6lEe8CID9c22mGl uNgrXQ0y+tv90S+VbjdQTTXm5TM+D5df+O/pqSeEpZSsAclp8rbcOzOuH4MzKX5tvsCU Jh8Orjk9lRd1K9EZWNmBwi+jRqJhoGyuDpPqFT+TvM4cTn3yB6af1tUC+Mziy8ubs8dh P8nQ== X-Received: by 10.180.183.4 with SMTP id ei4mr16787898wic.21.1363066982756; Mon, 11 Mar 2013 22:43:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.13.227 with HTTP; Mon, 11 Mar 2013 22:42:42 -0700 (PDT) From: robins Date: Tue, 12 Mar 2013 11:12:42 +0530 Message-ID: Subject: Clarify 'dependent objects' for DROP COLUMN To: pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=001a11c22a2e4ff85004d7b3c3d7 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a11c22a2e4ff85004d7b3c3d7 Content-Type: text/plain; charset=ISO-8859-1 Hi, ALTER TABLE in postgresql.org/docs/devel/ says: RESTRICT: Refuse to drop the column or constraint if there are any dependent objects. This is the default behavior. Could someone confirm whether 'dependent objects' also includes SEQUENCES? i.e. if I create a sequence OWNED BY tbl.col1 and then try to drop the column with RESTRICT, should it allow this DROP? Currently it does, but by reading that line it seemed it shouldn't. Thanks -- Robins Tharakan p.s.: Had to re-post this. Apologies if this lands up twice in the queue. --001a11c22a2e4ff85004d7b3c3d7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
<= div class=3D"gmail_default" style=3D"color:rgb(34,34,34);font-family:arial,= sans-serif;font-size:13px">
ALTER TABLE in=A0postgresql.org/docs/devel/=A0says:

RESTRICT: Ref= use to drop the column or constraint if there are any dependent objects. Th= is is the default behavior.

=
Could someone confirm whether '= dependent objects' also includes SEQUENCES?=A0i.e. if I create a sequence OWN= ED BY tbl.col1 and then try to drop the column with RESTRICT, should it all= ow this DROP? Currently it does, but by reading that line it seemed it shou= ldn't.

Thanks
--
Robi= ns Tharakan
p.s.: Had to re-post this. Apologies if this la= nds up twice in the queue.
--001a11c22a2e4ff85004d7b3c3d7--