Skip to content

Commit 2203282

Browse files
committed
Error when a specified connection service is not found, instead of ignoring it
1 parent c19781a commit 2203282

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.379 2009/11/29 18:53:44 petere Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.380 2009/11/29 20:14:53 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3223,6 +3223,13 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
32233223
}
32243224

32253225
fclose(f);
3226+
3227+
if (!group_found)
3228+
{
3229+
printfPQExpBuffer(errorMessage,
3230+
libpq_gettext("definition of service \"%s\" not found\n"), service);
3231+
return 3;
3232+
}
32263233
}
32273234

32283235
return 0;

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