Skip to content

Commit 5a41c31

Browse files
committed
Avoid "identifier will be truncated" warning in dblink
when connection string is longer than NAMEDATALEN. The previous fix for long connection name broke the behavior.
1 parent d6e503a commit 5a41c31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/dblink/dblink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Darko Prenosil <Darko.Prenosil@finteh.hr>
99
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
1010
*
11-
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.93 2010/06/09 00:56:02 itagaki Exp $
11+
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.94 2010/06/09 03:39:26 itagaki Exp $
1212
* Copyright (c) 2001-2010, PostgreSQL Global Development Group
1313
* ALL RIGHTS RESERVED;
1414
*
@@ -2399,7 +2399,7 @@ get_connect_string(const char *servername)
23992399

24002400
/* first gather the server connstr options */
24012401
srvname = pstrdup(servername);
2402-
truncate_identifier(srvname, strlen(srvname), true);
2402+
truncate_identifier(srvname, strlen(srvname), false);
24032403
foreign_server = GetForeignServerByName(srvname, true);
24042404

24052405
if (foreign_server)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy