summaryrefslogtreecommitdiff
path: root/src/include/libpq
diff options
context:
space:
mode:
authorBruce Momjian2002-08-18 03:03:26 +0000
committerBruce Momjian2002-08-18 03:03:26 +0000
commit2c6b34d95980a102ab0c7f1049ec2869ab01ac74 (patch)
treeae0a15e92c7b4db89a1162d781dcf26dcc4b9575 /src/include/libpq
parent4b26e7d24bda2d4de00cab1ddb482241487872c0 (diff)
Add db-local user names, per discussion on hackers.
Diffstat (limited to 'src/include/libpq')
-rw-r--r--src/include/libpq/libpq-be.h4
-rw-r--r--src/include/libpq/pqcomm.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
index 3dc0a6f4cd0..1a2382026c5 100644
--- a/src/include/libpq/libpq-be.h
+++ b/src/include/libpq/libpq-be.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-be.h,v 1.32 2002/06/20 20:29:49 momjian Exp $
+ * $Id: libpq-be.h,v 1.33 2002/08/18 03:03:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,7 +59,7 @@ typedef struct Port
ProtocolVersion proto;
char database[SM_DATABASE + 1];
- char user[SM_USER + 1];
+ char user[SM_DATABASE_USER + 1];
char options[SM_OPTIONS + 1];
char tty[SM_TTY + 1];
char auth_arg[MAX_AUTH_ARG];
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index e215e8a7f04..f0ea4e35943 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.65 2002/08/12 14:35:26 tgl Exp $
+ * $Id: pqcomm.h,v 1.66 2002/08/18 03:03:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -114,6 +114,8 @@ typedef uint32 PacketLen;
#define SM_DATABASE 64
/* SM_USER should be the same size as the others. bjm 2002-06-02 */
#define SM_USER 32
+/* We append database name if db_user_namespace true. */
+#define SM_DATABASE_USER (SM_DATABASE+SM_USER+1) /* +1 for @ */
#define SM_OPTIONS 64
#define SM_UNUSED 64
#define SM_TTY 64
@@ -124,12 +126,14 @@ typedef struct StartupPacket
{
ProtocolVersion protoVersion; /* Protocol version */
char database[SM_DATABASE]; /* Database name */
+ /* Db_user_namespace appends dbname */
char user[SM_USER]; /* User name */
char options[SM_OPTIONS]; /* Optional additional args */
char unused[SM_UNUSED]; /* Unused */
char tty[SM_TTY]; /* Tty for debug output */
} StartupPacket;
+extern bool Db_user_namespace;
/* These are the authentication requests sent by the backend. */