pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Alex <ash@commandprompt.com>
Cc: Marko Kreen <markokr@gmail.com>
Cc: Daniel Farina <daniel@heroku.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Another review of URI for libpq, v7 submission
Date: Tue, 27 Mar 2012 16:03:30 +0300
Message-ID: <4F71BAA2.7080902@enterprisedb.com> (raw)
In-Reply-To: <87k42cb9dr.fsf@commandprompt.com>
References: <CAAZKuFZ6d5aB8Tt-vq=xdCA4xEcLTDYK_d+G2VunpSuuqyKktA@mail.gmail.com>
	<87d38eaq3f.fsf@commandprompt.com>
	<CAAZKuFYKZbXhFyXiQOHx87Qq7MbzhN2iaqN_SFCQu3fkCV6Z7Q@mail.gmail.com>
	<87k42lsgck.fsf@commandprompt.com>
	<20120317145110.GA25172@gmail.com>
	<8762dyuda3.fsf@commandprompt.com>
	<87k42cb9dr.fsf@commandprompt.com>

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



view thread (19+ messages)  latest in thread

Message-ID: <4F71BAA2.7080902@enterprisedb.com>
Permalink:  ../4F71BAA2.7080902@enterprisedb.com/
Also on:    postgresql.org/message-id/4F71BAA2.7080902@enterprisedb.com

 · 

reply

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-hackers@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, ash@commandprompt.com, markokr@gmail.com, daniel@heroku.com
  Subject: Re: Another review of URI for libpq, v7 submission
  In-Reply-To: <4F71BAA2.7080902@enterprisedb.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