BUG #5761: In 'dblink' function connection string truncated

Lists: pgsql-bugs
From: "dp" <prikotov(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5761: In 'dblink' function connection string truncated
Date: 2010-11-22 08:04:03
Message-ID: 201011220804.oAM843hl004885@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5761
Logged by: dp
Email address: prikotov(at)gmail(dot)com
PostgreSQL version: 8.3.12
Operating system: Fedora release 14 (Laughlin)
Description: In 'dblink' function connection string truncated
Details:

The connection info string in 'dblink' function truncated to 62 characters.
On execution: 'NOTICE: identifier "dbname=somebase host=xx.xxx.xx.xx
user=iamuser password=somepassword77 port=5432" will be truncated to
"dbname=somebase host=xx.xxx.xx.xx user=iamuser password=somepas"'


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "dp" <prikotov(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5761: In 'dblink' function connection string truncated
Date: 2010-11-22 16:20:09
Message-ID: 27731.1290442809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"dp" <prikotov(at)gmail(dot)com> writes:
> Description: In 'dblink' function connection string truncated
> Details:

> The connection info string in 'dblink' function truncated to 62 characters.
> On execution: 'NOTICE: identifier "dbname=somebase host=xx.xxx.xx.xx
> user=iamuser password=somepassword77 port=5432" will be truncated to
> "dbname=somebase host=xx.xxx.xx.xx user=iamuser password=somepas"'

Does this actually break anything, or is it just an annoying NOTICE?
When I try it here, I get the NOTICE as described, but the connection
string still works.

regards, tom lane


From: queej <dqj(at)authentrics(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5761: In 'dblink' function connection string truncated
Date: 2010-11-29 15:50:09
Message-ID: 1291045809415-3284606.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


Yes, it causes an error for me since it truncates the connection string in
the middle of the username, omitting the password altogether. I must be
missing something; I can't understand what my alternative is but to call the
dblink(text,text) function with a connection string and a SQL statement.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5761-In-dblink-function-connection-string-truncated-tp3275060p3284606.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


From: queej <dqj(at)quinn-jacobs(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5761: In 'dblink' function connection string truncated
Date: 2010-11-29 16:31:33
Message-ID: 7dea3e9c-243d-4613-a27e-336abcb0905f@l17g2000yqe.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Nov 29, 10:50 am, d(dot)(dot)(dot)(at)authentrics(dot)com (queej) wrote:
> Yes, it causes an error for me since it truncates the connection string in
> the middle of the username, omitting the password altogether.  I must be
> missing something; I can't understand what my alternative is but to call the
> dblink(text,text) function with a connection string and a SQL statement.

I should have mentioned that my dblink() calls are within views, so I
cannot do a two-step process of dblink_connect() followed by a
dblink().


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: queej <dqj(at)quinn-jacobs(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5761: In 'dblink' function connection string truncated
Date: 2010-11-29 18:27:38
Message-ID: 1053.1291055258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

queej <dqj(at)quinn-jacobs(dot)org> writes:
> On Nov 29, 10:50am, d(dot)(dot)(dot)(at)authentrics(dot)com (queej) wrote:
>> Yes, it causes an error for me since it truncates the connection string in
>> the middle of the username, omitting the password altogether. I must be
>> missing something; I can't understand what my alternative is but to call the
>> dblink(text,text) function with a connection string and a SQL statement.

> I should have mentioned that my dblink() calls are within views, so I
> cannot do a two-step process of dblink_connect() followed by a
> dblink().

As far as our investigation could tell, the message you're complaining
about is simply a warning and would not result in any actual failure.
I agree it's a bug that the message comes out at all, but it appears
to be just cosmetic. If you have a situation where it leads to a
non-cosmetic problem, you need to provide a complete test case
illustrating that, or it's not going to get fixed.

regards, tom lane