Skip site navigation (1) Skip section navigation (2)

Re: BUG #1862: ECPG Connect, host variable trailing blanks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Jim(dot)Gray(at)Bull(dot)com, pgsql-bugs(at)postgresql(dot)org,Ken(dot)Rosensteel(at)Bull(dot)com
Subject: Re: BUG #1862: ECPG Connect, host variable trailing blanks
Date: 2005-09-09 04:15:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> If you think this behavior should be changed then propose it on
> pgsql-hackers and discuss it with the developers.

I doubt we'll consider changing it.  If I haven't missed any of the
details, the critical points here are

(1) User names containing trailing (or embedded) spaces are legal.
    Not a very good idea maybe, but legal both per SQL spec and per
    our historical practice.

(2) Making ECPG strip trailing spaces would render it unable to
    connect as such a user.

I don't think ECPG has any business deciding that trailing spaces are
insignificant.  If that's the case in your application environment,
fine: strip the spaces at the application level.  But don't expect a
general-purpose library to make that policy choice for you.

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Sijin MSDate: 2005-09-09 07:54:05
Subject: BUG #1870: Insertion problem
Previous:From: Michael FuhrDate: 2005-09-09 03:28:40
Subject: Re: BUG #1862: ECPG Connect, host variable trailing blanks

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group