Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8217202

Browse files
committed
From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [PATCHES] libpq SET var TO patch One last, I hope. This one corrects a bogus format string, andactually sends the contents of PG_DATESTYLE to the backend. Thatmeans, you can do a setenv PG_DATESTYLE 'iso', and your libpqwill pick that up and tell the backend.
1 parent9f2d714 commit8217202

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.31 1997/04/17 20:39:23 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.32 1997/05/07 03:13:50 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -106,12 +106,7 @@ struct EnvironmentOptions
106106
constchar*envName,*pgName;
107107
}EnvironmentOptions[]=
108108
{
109-
{"PG_DATE","date" },
110-
{"PG_TIME","time" },
111-
{"PG_FLOAT","float" },
112-
{"PG_LANG","language" },
113-
{"PG_TZONE","timezone" },
114-
{"PG_MONEY","money" },
109+
{"PG_DATESTYLE","datestyle" },
115110
{NULL }
116111
};
117112

@@ -561,7 +556,7 @@ connectDB(PGconn *conn)
561556
{
562557
PGresult*res;
563558

564-
sprintf(setQuery,"SET %s TO '.60%s'",eo->pgName,val);
559+
sprintf(setQuery,"SET %s TO '%.60s'",eo->pgName,val);
565560
res=PQexec(conn,setQuery);
566561
PQclear(res);/* Don't care? */
567562
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp