From: Vlad <marchenko@gmail.com>
To: Brandon Metcalf <bmetcalf@nortel.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: dbdpg-general@gborg.postgresql.org, pgsql-interfaces@postgresql.org, Sean Davis <sdavis2@mail.nih.gov>
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Date: Fri, 8 Apr 2005 16:47:04 -0400
Message-ID: <cd70c68105040813475c49c858@mail.gmail.com> (raw)
In-Reply-To: <cd70c68105040813249ec7813@mail.gmail.com>
References: <Pine.LNX.4.58L.0504081127400.18466@cash.rhiamet.com>
<cd70c6810504081112694ba268@mail.gmail.com>
<Pine.LNX.4.58L.0504081316270.18466@cash.rhiamet.com>
<cd70c68105040811403321e846@mail.gmail.com>
<16221.1112987509@sss.pgh.pa.us>
<cd70c681050408122241d026c5@mail.gmail.com>
<Pine.LNX.4.58L.0504081513100.18466@cash.rhiamet.com>
<cd70c68105040813249ec7813@mail.gmail.com>
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 <marchenko@gmail.com> 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 <bmetcalf@nortel.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: marchenko@gmail.com, bmetcalf@nortel.com, tgl@sss.pgh.pa.us, sdavis2@mail.nih.gov
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
In-Reply-To: <cd70c68105040813475c49c858@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox