X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 51910DA2A8 for ; Wed, 19 Oct 2005 13:00:51 -0300 (ADT) 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 05077-04 for ; Wed, 19 Oct 2005 16:00:45 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by svr1.postgresql.org (Postfix) with ESMTP id 5028ED89FB for ; Wed, 19 Oct 2005 13:00:45 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i5so175104wra for ; Wed, 19 Oct 2005 09:00:45 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nyd0riOLYJBV/QgvBduhLQ1wFeDwY5iaO4D8Imd8KwUimZyrG23GYNpF8nHlEnG4ZVi5Ss9TvakqS4l20D/ct3rVpbgYGv0xd5MuhXY4cHXQ7uLzkNsyDegp+Sku/LnaVnIkfNhOX7Hd1X3TVAQWCad/ybCCliL0px63rg586H4= Received: by 10.54.89.13 with SMTP id m13mr638893wrb; Wed, 19 Oct 2005 09:00:44 -0700 (PDT) Received: by 10.54.105.13 with HTTP; Wed, 19 Oct 2005 09:00:44 -0700 (PDT) Message-ID: <3fccaa690510190900u3f2f97afle989609094b34725@mail.gmail.com> Date: Wed, 19 Oct 2005 10:00:44 -0600 From: Andres Olarte To: Kevin Grittner Subject: Re: How to bulk load a schema using JDBC multiple times? Cc: pgsql-jdbc@postgresql.org In-Reply-To: <435623340200002500000116@gwmta.wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <435623340200002500000116@gwmta.wicourts.gov> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.294 required=5 tests=[AWL=0.270, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/90 X-Sequence-Number: 14021 That's exactly what I need ! That's so easy I never thought it was useful for my situation, I was looking for a complex way :( Why do thing the easy way, if they can be done the hard way? Thanks a lot ! On 10/19/05, Kevin Grittner wrote: > http://www.postgresql.org/docs/8.0/interactive/manage-ag-templatedbs.html > > >>> Andres Olarte >>> > Hi, > > Yes, but how? I tried to create a stored procedure with all of the > commands. I tried creating a table in a special schema, storing the > schema in that table, and executing commands off that table. They > have all failed due to quote problems. Any other ideas? > > On 10/18/05, Kevin Grittner wrote: > > Have you considered having your test suite create a template > > database, and using it to drop and create the test database? > > > > >>> Andres Olarte >>> > > Hi, > > > > I need to load and drop my schema multiple times during my unit tests. > > This happens several thousand times per run of my test suite. I'm > > loading the schema from the file that's generated by pg_dump, and it > > works, but it's SLOW. My tests are taking more than 10 minutes now, > > and most of the time is spent loading the schema. If there away to do > > this faster? May be using a store procedure with the whole schema? > > I've tried making such a procedure, but it doesn't work do to quoting > > problems. Anybody have any ideas? Thanks > > > > Andres > > > > > >