From d9314191a1fe4f3fe612f7975911f9a2af2e3f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 19 Oct 2014 21:30:31 +0000 Subject: [PATCH] [GB.DB.POSTGRESQL] * BUG: Quote field names when creating a table, even if they are converted to lower cases. git-svn-id: svn://localhost/gambas/trunk@6565 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.db.postgresql/src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gb.db.postgresql/src/main.c b/gb.db.postgresql/src/main.c index 6a59ef03f..e8fd1468d 100644 --- a/gb.db.postgresql/src/main.c +++ b/gb.db.postgresql/src/main.c @@ -1870,7 +1870,9 @@ static int table_create(DB_DATABASE *db, const char *table, DB_FIELD *fields, ch else comma = TRUE; + DB.Query.Add(QUOTE_STRING); DB.Query.AddLower(fp->name); + DB.Query.Add(QUOTE_STRING); if (fp->type == DB_T_SERIAL) { @@ -1935,7 +1937,9 @@ static int table_create(DB_DATABASE *db, const char *table, DB_FIELD *fields, ch if (i > 0) DB.Query.Add(","); + DB.Query.Add(QUOTE_STRING); DB.Query.AddLower(primary[i]); + DB.Query.Add(QUOTE_STRING); } DB.Query.Add(")");