[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
This commit is contained in:
Benoît Minisini 2014-10-19 21:30:31 +00:00
parent 2fb483cde9
commit d9314191a1

View File

@ -1870,7 +1870,9 @@ static int table_create(DB_DATABASE *db, const char *table, DB_FIELD *fields, ch
else else
comma = TRUE; comma = TRUE;
DB.Query.Add(QUOTE_STRING);
DB.Query.AddLower(fp->name); DB.Query.AddLower(fp->name);
DB.Query.Add(QUOTE_STRING);
if (fp->type == DB_T_SERIAL) 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) if (i > 0)
DB.Query.Add(","); DB.Query.Add(",");
DB.Query.Add(QUOTE_STRING);
DB.Query.AddLower(primary[i]); DB.Query.AddLower(primary[i]);
DB.Query.Add(QUOTE_STRING);
} }
DB.Query.Add(")"); DB.Query.Add(")");