Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A4CCA16D90F7 for ; Tue, 27 Mar 2012 10:04:06 -0300 (ADT) Received: from exprod7og127.obsmtp.com ([64.18.2.210]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SCW46-0007Jq-VM for pgsql-hackers@postgresql.org; Tue, 27 Mar 2012 13:04:05 +0000 Received: from mail-lpp01m010-f47.google.com ([209.85.215.47]) (using TLSv1) by exprod7ob127.postini.com ([64.18.6.12]) with SMTP ID DSNKT3G6sOFZwLBMEg4Goq/7WRL18cdtLA/v@postini.com; Tue, 27 Mar 2012 06:03:58 PDT Received: by mail-lpp01m010-f47.google.com with SMTP id w12so6476875lag.34 for ; Tue, 27 Mar 2012 06:03:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=afGw3rbLP/FLOciGMwlEYxEnqoJB/VCV9CAvzczGrYU=; b=ojKRmRoJG1dpECsvzGXePtA8ALazT13sUjIfohWkuf8W4x15BPQS+Bx+b0o9PF3nnb nfzFOOKfCs6QFz5LlQ/TECQVxNJZZLE0Vcgyp1ZC5qEDMIoqo0iZ3U/81VrkYjjdNIbh ijsXXTUVDzCv51S5P7xDk/SW27fF/Xuz9noYmUXHywpNvc2xbuvL3PHN5D0BuMzxkm1c G3cbdBsAD5kl76Fz8c6kiodBeGGox3dL7rNEUoQAcyvteCBCleC1n5VVeSSlh2rkVCLL Zysz1OUIPju1BULl8XINliflMOSrh0PhCSODdrnmiQWyvil5LfSbViGQeLbbD3Kb6ekr YTzw== Received: by 10.112.84.42 with SMTP id v10mr9680826lby.50.1332853423789; Tue, 27 Mar 2012 06:03:43 -0700 (PDT) Received: from [192.168.1.100] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id tt5sm20227639lab.10.2012.03.27.06.03.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Mar 2012 06:03:36 -0700 (PDT) Message-ID: <4F71BAA2.7080902@enterprisedb.com> Date: Tue, 27 Mar 2012 16:03:30 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120324 Icedove/10.0.3 MIME-Version: 1.0 To: Alex CC: Marko Kreen , Daniel Farina , pgsql-hackers Subject: Re: Another review of URI for libpq, v7 submission References: <87d38eaq3f.fsf@commandprompt.com> <87k42lsgck.fsf@commandprompt.com> <20120317145110.GA25172@gmail.com> <8762dyuda3.fsf@commandprompt.com> <87k42cb9dr.fsf@commandprompt.com> In-Reply-To: <87k42cb9dr.fsf@commandprompt.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQmREZFZ8TmvjD20nmlh9CBVn+/u+wpN422o7GKB7MYUBJHg8HgGGkEdAlPnYL2XO4ATuZ0V X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201203/1626 X-Sequence-Number: 205508 On 22.03.2012 23:42, Alex wrote: > Okay, at last here's v9, rebased against current master branch. Some quick comments on this patch: I see a compiler warning: fe-connect.c: In function ‘conninfo_parse’: fe-connect.c:4113: warning: unused variable ‘option’ Docs are missing. I wonder if you should get an error if you try specify the same option multiple times. At least the behavior needs to be documented. Should %00 be forbidden? The error message is a bit confusing for "postgres://localhost?dbname=%XXfoo": WARNING: ignoring unrecognized URI query parameter: dbname There is in fact nothing wrong with "dbname", it's the %XX in the value that's bogus. Looking at conninfo_uri_decode(), I think it's missing a bounds check, and peeks at two bytes beyond the end of string if the input ends in a '%'. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com