X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 859D656567 for ; Sat, 26 Feb 2005 20:56:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82511-10 for ; Sat, 26 Feb 2005 20:56:46 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by svr1.postgresql.org (Postfix) with ESMTP id 0A8635653A for ; Sat, 26 Feb 2005 20:56:52 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so707015wra for ; Sat, 26 Feb 2005 12:56:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=EUUxJ/qvgLQcJ0sy/3qCTaGNCgTl0Q4IlIUTia9fzaOWRc6wwKrhvnMeanuznyaDQ7pQMhApCIlfWgED4B6WYZSyG38pcUVmeu4awTjKaFB32AiA/Saw6Z20exJSrokVtXWMW9WX2CIAWhftZCSpo+GKbPwiAgFulKn5sNUYwTM= Received: by 10.54.44.55 with SMTP id r55mr44991wrr; Sat, 26 Feb 2005 12:56:52 -0800 (PST) Received: by 10.54.4.71 with HTTP; Sat, 26 Feb 2005 12:56:52 -0800 (PST) Message-ID: <6c21003b050226125634e9964@mail.gmail.com> Date: Sat, 26 Feb 2005 14:56:52 -0600 From: Don Drake Reply-To: Don Drake To: pgsql-sql@postgresql.org Subject: AutoCommit and DDL Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200502/329 X-Sequence-Number: 20439 I have a generic function that creates partition tables and their corresponding indexes and constraints. I've tested the function using a GUI and it works great. We implemented in our data loaders (written in perl) and the DB connections have AutoCommit turned off. When we run it in the perl script, I see the code being execute to create the tables, etc. but they are never created, even with a commit at the end. It appears something is causing the table creation to get rolled back. I turned AutoCommit on and re-ran the perl script and the tables get created. Why won't these table's get created when AutoCommit is off? Why do I have to commit DDL? I'm running 7.4.3. Thanks. -Don -- Donald Drake President Drake Consulting http://www.drakeconsult.com/ http://www.MailLaunder.com/ 312-560-1574