Skip Menu |
 

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 83830
Status: rejected
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: barwick [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From barwick [...] gmail.com Fri Mar 8 09: 22:56 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.22 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
X-Spam-Flag: NO
Content-Type: text/plain; charset=UTF-8
Message-ID: <CAB8KJ=ik0WbmtttOn8fp-XNVkGjQwF2Zdm+CgvNvJU5FTuXkVw [...] mail.gmail.com>
X-Received: by 10.50.57.225 with SMTP id l1mr1744169igq.71.1362752563001; Fri, 08 Mar 2013 06:22:43 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.22
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 0350D2405BF for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Fri, 8 Mar 2013 09:22:56 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JIJlAPQwr2dR for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Fri, 8 Mar 2013 09:22:50 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 83A1D2404F8 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 8 Mar 2013 09:22:50 -0500 (EST)
Received: (qmail 27994 invoked by uid 103); 8 Mar 2013 14:22:49 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 8 Mar 2013 14:22:49 -0000
Received: from mail-ie0-f171.google.com (HELO mail-ie0-f171.google.com) (209.85.223.171) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Fri, 08 Mar 2013 06:22:46 -0800
Received: by mail-ie0-f171.google.com with SMTP id 10so2074835ied.16 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 08 Mar 2013 06:22:43 -0800 (PST)
Received: by 10.50.106.166 with HTTP; Fri, 8 Mar 2013 06:22:42 -0800 (PST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
Subject: FYI: error with placeholders in CONCAT() function
Return-Path: <barwick [...] gmail.com>
X-RT-Mail-Extension: dbd-pg
X-Original-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=nSirbLcvRGqwQiLOeprnu7XtkotpFnziucA7csWcQPs=; b=y1ajFVNOoyivcD6fEHPCI/pHhU1ukHP7ndiNZAoIN3R4KCXlGIRp3VvpKIu+uZeNxn Jh4BsIpuhV02UnZc3wdvs0k1Rn/HmloeEAfoi5sUI9mxXPoZd0y3ArBquGws3zrC4rs6 Z2cYso2mNYg0K0RwwW9UW0qq6o0vgXae8By/emaDFuM6YbvdJA6gNe7P1CuamajU6/K6 H1pf949dAVPc1kA8qBGWXd+54pwoDsVqJi2KMchS79rOGCLp+QtnQjGPCujDh78l7x+n GL6GqLhoxpdEaP3quYfVK3+h94wlZd7dmN7Xn7AaDL0a6ejwC/qla9GpmM7M+APdbq4c LlOg==
Date: Fri, 8 Mar 2013 23:22:42 +0900
X-Spam-Level:
To: bug-DBD-Pg [...] rt.cpan.org
From: Ian Lawrence Barwick <barwick [...] gmail.com>
X-RT-Original-Encoding: utf-8
Content-Length: 516
Download (untitled) / with headers
text/plain 516b
DBD::Pg version: 2.19.3 PostgreSQL version: 9.2.3 ----------------------------------------------------- use strict; use DBI; my $dbh = DBI->connect( 'dbi:Pg:dbname=testdb', 'barwick', '', { PrintError => 1, RaiseError => 0 } ); my $sth = $dbh->prepare(q|SELECT CONCAT('foo', ?)|); $sth->execute('bar'); ----------------------------------------------------- Executing the above produces the following error DBD::Pg::st execute failed: ERROR: could not determine data type of parameter $1 at concat.pl line 17.
MIME-Version: 1.0
In-Reply-To: <CAB8KJ=ik0WbmtttOn8fp-XNVkGjQwF2Zdm+CgvNvJU5FTuXkVw [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CAB8KJ=ik0WbmtttOn8fp-XNVkGjQwF2Zdm+CgvNvJU5FTuXkVw [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.13-8563-1372732202-756.83830-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 514
Download (untitled) / with headers
text/plain 514b
Show quoted text
> my $sth = $dbh->prepare(q|SELECT CONCAT('foo', ?)|); > DBD::Pg::st execute failed: ERROR: could not determine data type of > parameter $1 at concat.pl line 17.
That's a Postgres error, not a DBD::Pg one. You need to supply Postres with a little more information about what type you are trying to join together. For example, you could use: SELECT CONCAT('foo', ?::text) Alternatively, you can turn offperpared statements at the server side entirely: my $sth = $dbh->prepare($SQL, { pg_server_prepare => 0});


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.