Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2D6DF6326BC for ; Sat, 6 Mar 2010 12:34:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 01635-06 for ; Sat, 6 Mar 2010 16:34:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mail.postgresql.org (Postfix) with ESMTP id 886C3632178 for ; Sat, 6 Mar 2010 12:34:19 -0400 (AST) Received: by bwz28 with SMTP id 28so1535060bwz.34 for ; Sat, 06 Mar 2010 08:34:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=W7O6iBEKhWNW62nMIcUlghqoMjq4Gfz9P4c0e9GUSzk=; b=i21I9kgY0wUIxvD6syxDlBx/FGIMehhYNUmrXmgB9cPlqyyBzrDSue/1kAy0+rhD7z pKnY+KOkIXCEyL3BI4Bngjxm528MeklXtZj/Rl+cRAU3lU/r0/qxY9657PgzzWMkTbLO YXAhxC/SVT8aB9gNTNMRaO8M4w9O99hezza44= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=rJuI8MSoKLNRc2jsy1WJMD2a/I5EdYzfGFHbr1d72pawao+shR5+U2QWfxal6l1iME 0f6MLuG/ij8aZU1WRg7NP8E0AnrK3ymZuHgypn98k/URp6lJp7OfPSkZ+Oa1n04Wa3Gz SSBGlD10b4+j8WabyWLPNoG/+WmrlPE1Otloc= Received: by 10.204.6.8 with SMTP id 8mr1927977bkx.115.1267893254163; Sat, 06 Mar 2010 08:34:14 -0800 (PST) Received: from [192.168.1.128] (net-93-144-32-214.t2.dsl.vodafone.it [93.144.32.214]) by mx.google.com with ESMTPS id 16sm1405402bwz.13.2010.03.06.08.34.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 06 Mar 2010 08:34:13 -0800 (PST) Message-ID: <4B928400.1070709@gmail.com> Date: Sat, 06 Mar 2010 17:34:08 +0100 From: Gianvito Pio User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Drop all constraints Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201003/46 X-Sequence-Number: 33753 Hi all, is there a way to drop all constraints of a table? I found this workaround in the manual: CREATE TABLE temp AS SELECT * FROM distributors; DROP TABLE distributors; CREATE TABLE distributors AS SELECT * FROM temp; DROP TABLE temp; Is there any other way to do it? Thanks