X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D21E4535D8 for ; Fri, 8 Apr 2005 21:47:12 +0100 (BST) 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 39790-03 for ; Fri, 8 Apr 2005 20:47:03 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by svr1.postgresql.org (Postfix) with ESMTP id 7F7B453572 for ; Fri, 8 Apr 2005 21:47:02 +0100 (BST) Received: by wproxy.gmail.com with SMTP id 69so1163779wri for ; Fri, 08 Apr 2005 13:47:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KYrD6E3dWm4Eq4JFPKaSyGaF0Qz+Er3qqdAxWxMV2QsB8cdOa3EwpKrdU5I+kT0oulrMB48KgXGfP1tu2qCVL4OsOTi6PLKtRVa1YdZLBt004VAikRcaotA+vpZj7UiKM9PVCHpQVW/8UyKUcqD9OEQ5DYzAhPm3hpC+UVLsRs0= Received: by 10.54.2.44 with SMTP id 44mr296546wrb; Fri, 08 Apr 2005 13:47:05 -0700 (PDT) Received: by 10.54.45.39 with HTTP; Fri, 8 Apr 2005 13:47:04 -0700 (PDT) Message-ID: Date: Fri, 8 Apr 2005 16:47:04 -0400 From: Vlad Reply-To: Vlad To: Brandon Metcalf Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg Cc: Tom Lane , dbdpg-general@gborg.postgresql.org, pgsql-interfaces@postgresql.org, Sean Davis In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <16221.1112987509@sss.pgh.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.273 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/38 X-Sequence-Number: 5454 Brandon, could you let us know YOUR results with DBD::Pg 1.41 with and w/o patch that I've posted earlier? I just did some surface-deep testing here and here is what I've found: DBD-1.40 - slow DBD-1.41 - fast DBD-1.41, patched - fast. I can't see difference between patched and non patched. so it actually turned out that stock 1.41 already has that problem fixed... Though using UNKNOWN instead of VARCHAR for cases when no type was supplied (as Tom Lane suggested) is still a good idea, I think. My patch needs to be careful reviewed - I'm not familiar with DBD:Pg on a deep enough level to gurantee that it's not screwing anything. On Apr 8, 2005 4:24 PM, Vlad wrote: > Brandon, > > try this patch instead. > > diff -ru DBD-Pg-1.41/dbdimp.c DBD-Pg-1.41-patched/dbdimp.c > --- DBD-Pg-1.41/dbdimp.c Fri Apr 8 16:06:12 2005 > +++ DBD-Pg-1.41-patched/dbdimp.c Fri Apr 8 15:46:50 2005 > @@ -1415,7 +1415,7 @@ > } > else if (NULL == currph->bind_type) { /* "sticky" data type */ > /* This is the default type, but we will honor > defaultval if we can */ > - currph->bind_type = pg_type_data(VARCHAROID); > + currph->bind_type = pg_type_data(UNKNOWNOID); > if (!currph->bind_type) > croak("Default type is bad!!!!???"); > } > diff -ru DBD-Pg-1.41/types.c DBD-Pg-1.41-patched/types.c > --- DBD-Pg-1.41/types.c Fri Apr 8 16:06:23 2005 > +++ DBD-Pg-1.41-patched/types.c Fri Apr 8 15:46:37 2005 > @@ -55,7 +55,7 @@ > {ABSTIMEOID, "abstime", DBDPG_TRUE, null_quote, null_dequote, {0}}, > {RELTIMEOID, "reltime", DBDPG_TRUE, null_quote, null_dequote, {0}}, > {TINTERVALOID, "tinterval", DBDPG_TRUE, null_quote, null_dequote, {0}}, > - {UNKNOWNOID, "unknown", DBDPG_FALSE, null_quote, null_dequote, {0}}, > + {UNKNOWNOID, "unknown", DBDPG_FALSE, quote_varchar, null_dequote, {0}}, > {CIRCLEOID, "circle", DBDPG_FALSE, null_quote, null_dequote, {0}}, > {CASHOID, "money", DBDPG_TRUE, null_quote, null_dequote, {0}}, > {MACADDROID, "MAC address", DBDPG_TRUE, > quote_varchar,dequote_varchar, {0}}, > > > On Apr 8, 2005 4:14 PM, Brandon Metcalf wrote: > > m == marchenko@gmail.com writes: > > > > m> --- dbdimp.c.bak Wed Apr 6 16:40:20 2005 > > m> +++ dbdimp.c Fri Apr 8 15:21:29 2005 > > m> @@ -1415,7 +1415,7 @@ > > m> } > > m> else if (NULL == currph->bind_type) { /* "sticky" data type */ > > m> /* This is the default type, but we will honor > > m> defaultval if we can */ > > m> - currph->bind_type = pg_type_data(VARCHAROID); > > m> + currph->bind_type = pg_type_data(UNKNOWNOID); > > m> if (!currph->bind_type) > > m> croak("Default type is bad!!!!???"); > > m> } > > > > Using this patch results in error messages like: > > > > DBD::Pg::st execute failed: ERROR: syntax error at or near "15" at character 158 > > > > Not sure why yet. > > > > -- > > Brandon > > > > -- > Vlad > -- Vlad