Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: felipe [...] felipegasper.com
Cc:
AdminCc:

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



X-Source:
MIME-Version: 1.0
X-Source-Args:
X-Spam-Status: No, score=-3.243 tagged_above=-99.9 required=10 tests=[AWL=-0.653, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, T_FROM_12LTRDOM=0.01] autolearn=ham
X-From-Rewrite: unmodified, already matched
X-Source-Dir:
X-Outgoing-Spam-Status: No, score=-2.9
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <561DE46F.5030307 [...] felipegasper.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - premium12.web-hosting.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - felipegasper.com
X-Spam-Score: -3.243
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 3FED9240064 for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Wed, 14 Oct 2015 01:13:26 -0400 (EDT)
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 5xBymHiVSQm6 for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Wed, 14 Oct 2015 01:13:25 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C35A7240026 for <bug-DBD-Pg [...] rt.cpan.org>; Wed, 14 Oct 2015 01:13:24 -0400 (EDT)
Received: (qmail 3000 invoked by alias); 14 Oct 2015 05:13:23 -0000
Received: from p12.web-hosting.com (HELO p12.web-hosting.com) (192.64.118.62) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 13 Oct 2015 22:13:22 -0700
Received: from 99-107-252-128.lightspeed.hstntx.sbcglobal.net ([99.107.252.128]:56707 helo=Macintosh.local) by premium12.web-hosting.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from <felipe [...] felipegasper.com>) id 1ZmENJ-002cvb-EX for bug-DBD-Pg [...] rt.cpan.org; Wed, 14 Oct 2015 01:13:18 -0400
Delivered-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
Subject: connect() not accepting dbname in attrs hash
Return-Path: <felipe [...] felipegasper.com>
X-RT-Mail-Extension: dbd-pg
X-Original-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Wed, 14 Oct 2015 00:13:19 -0500
X-Spam-Level:
X-Get-Message-Sender-Via: premium12.web-hosting.com: authenticated_id: fgasper/from_h
To: bug-DBD-Pg [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
From: Felipe Gasper <felipe [...] felipegasper.com>
X-RT-Original-Encoding: utf-8
X-RT-Interface: Email
Content-Length: 783
Download (untitled) / with headers
text/plain 783b
Observe that the attrs hashref in the first example doesn’t affect the actual database logged into. Show quoted text
> perl -MData::Dumper -MDBI -e'my $dbh = DBI->connect("dbi:Pg:",
"postgres", undef, { dbname => "mortal_nouveau" } ); print Dumper( $dbh->selectall_arrayref("select current_database()") )' $VAR1 = [ [ 'postgres' ] ]; Only when $ENV{PGDATABASE} is set does the expected behavior happen: Show quoted text
> perl -MData::Dumper -MDBI -e'$ENV{PGDATABASE} = "mortal_nouveau"; my
$dbh = DBI->connect("dbi:Pg:", "postgres", undef, { dbnam => "mortal_nouveau" } ); print Dumper( $dbh->selectall_arrayref("select current_database()") )' $VAR1 = [ [ 'mortal_nouveau' ] ]; This is DBD::Pg version 3.5.3.
MIME-Version: 1.0
In-Reply-To: <561DE46F.5030307 [...] felipegasper.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <561DE46F.5030307 [...] felipegasper.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-23310-1490970148-481.107763-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: 194
Download (untitled) / with headers
text/plain 194b
The DBI docs seem to indicate that only the username and password can be set in the %attr hash (along with PrintError, RaiseError, etc.). Is there a reason you would expect the dbname to work?
MIME-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Outgoing-Spam-Status: No, score=-1.0
X-From-Rewrite: unmodified, already matched
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.125
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=softfail (invalid, public key: not available) header.i= [...] felipegasper.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id CAA72240394 for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Fri, 31 Mar 2017 11:25:45 -0400 (EDT)
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 Dwhr0j-5ECUv for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Fri, 31 Mar 2017 11:25:44 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id F31EF240380 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 31 Mar 2017 11:25:43 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 329AC11DA70 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 31 Mar 2017 08:25:43 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 5417611DF33 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 31 Mar 2017 08:25:41 -0700 (PDT)
Received: from web1.siteocity.com (web1.siteocity.com [67.227.147.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id D110311DA70 for <bug-DBD-Pg [...] rt.cpan.org>; Fri, 31 Mar 2017 08:25:33 -0700 (PDT)
Received: from cpe64777d56aa33-cm64777d56aa30.cpe.net.cable.rogers.com ([99.250.237.237]:55810 helo=[192.168.0.12]) by web1.siteocity.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from <felipe [...] felipegasper.com>) id 1ctxrH-003K0X-LM for bug-DBD-Pg [...] rt.cpan.org; Fri, 31 Mar 2017 09:49:00 -0500
Delivered-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #107763] connect() not accepting dbname in attrs hash
Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=felipegasper.com; s=default; h=Message-Id:In-Reply-To:To:References:Date: Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T4rughJSv9ztxlKEpVPfq7wJv2ileJDhEZ8iBur1sAo=; b=DYPmwOQUnb6Afp4r19vTZUPGKH NNoDmiyZT0boVzCSSYjKVqh3Rub+sT7tuB+yEXfur1UO4iw3e89T0LzVe9Ag0sBo/t43mHe78EBKY zpcPZPLHtiywjqkEOLzUOiR60qxSkcotTcY2YIEUYDuftzjN+Au2e+YYSgib8kJPboksTfxUwIj2D JyDHBBPHYcvfokTbO0RDETmlS35SA/EmUNbgytwx2MCRFzL7pLSTJ9gKz51cm3tfrmFRZ3Io93da+ YizX9ZuNHUe4aLDIGJ1tOdkG788L5oYmMKm2pbQU57ItTBDXZN8HzTOJfuewJzsmW/HjVH16S6ubj UwR+3fxQ==;
Date: Fri, 31 Mar 2017 10:48:59 -0400
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MIME_LOWER_CASE 0.05, SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_800_899 0, DATE_TZ_NA 0, DKIM_SIGNATURE 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, URI_ENDS_IN_HTML 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_ANTIABUSE 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MSGID_APPLEMAIL 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT_APPLEMAIL 0, __X_MAILER_APPLEMAIL 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Authenticated-Sender: web1.siteocity.com: felipe [...] felipegasper.com
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2017.3.31.151216
X-Get-Message-Sender-Via: web1.siteocity.com: authenticated_id: fgasper/from_h
To: bug-DBD-Pg [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
X-Source:
X-Source-Args:
In-Reply-To: <rt-4.0.18-23310-1490970149-1939.107763-6-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-5.125 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, FROM_OUR_RT=-4, SPF_SOFTFAIL=0.665, T_DKIM_INVALID=0.01] autolearn=ham
X-Mailer: Apple Mail (2.3259)
X-Source-Dir:
X-RT-Interface: API
References: <RT-Ticket-107763 [...] rt.cpan.org> <561DE46F.5030307 [...] felipegasper.com> <rt-4.0.18-23310-1490970149-1939.107763-6-0 [...] rt.cpan.org>
Message-ID: <7A052F89-8796-470C-8F09-F968CA887416 [...] felipegasper.com>
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - web1.siteocity.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - felipegasper.com
Return-Path: <felipe [...] felipegasper.com>
X-RT-Mail-Extension: dbd-pg
X-Original-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
X-Greylist: delayed 2194 seconds by postgrey-1.34 at xx1.develooper.com; Fri, 31 Mar 2017 08:25:36 PDT
From: Felipe Gasper <felipe [...] felipegasper.com>
RT-Message-ID: <rt-4.0.18-30656-1490973946-250.107763-0-0 [...] rt.cpan.org>
Content-Length: 722
Download (untitled) / with headers
text/plain 722b
I can’t find where but I’ve definitely seen something where “db”, “dbname”, and “database” named parameters were all considered coequal named attributes to specify the db to the driver. I could have sworn that was in DBI, but all I find there is that DSNs should accept “database“ and “db” as aliases, not “dbname”. Fair enough. -F Show quoted text
> On Mar 31, 2017, at 10:22 AM, Greg Sabino Mullane via RT <bug-DBD-Pg@rt.cpan.org> wrote: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=107763 > > > The DBI docs seem to indicate that only the username and password can be set in the %attr hash (along with PrintError, RaiseError, etc.). Is there a reason you would expect the dbname to work? > >
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-30656-1490973946-250.107763-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-107763 [...] rt.cpan.org> <561DE46F.5030307 [...] felipegasper.com> <rt-4.0.18-23310-1490970149-1939.107763-6-0 [...] rt.cpan.org> <7A052F89-8796-470C-8F09-F968CA887416 [...] felipegasper.com> <rt-4.0.18-30656-1490973946-250.107763-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24550-1505940898-1581.107763-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: 124
Download (untitled) / with headers
text/plain 124b
Ok, closing. Feel free to reopen if you feel strong about it or find code in the while that needs that particular behavior.


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.