Re: [HACKERS] A problem with the constraint system.
От | Thomas G. Lockhart |
---|---|
Тема | Re: [HACKERS] A problem with the constraint system. |
Дата | |
Msg-id | 364AFC04.C8B00913@alumni.caltech.edu обсуждение исходный текст |
Ответ на | A problem with the constraint system. ("Billy G. Allie" <Bill.Allie@mug.org>) |
Список | pgsql-hackers |
> BGA> Creating a table with a name containing mixed case that has a > BGA> constraint, the creation will fail. For example: > BGA> mug=> create table "MyTest" ( a int4 default 10 ); > BGA> ERROR: mytest: Table does not exist. I have a fix for this, though I've only tested with your example. Here is the patch... - Tom*** ../src/backend/catalog/heap.c.orig Tue Sep 1 04:27:29 1998 --- ../src/backend/catalog/heap.c Thu Nov 12 15:09:58 1998 *************** *** 1515,1521 **** char nulls[4] = {' ', ' ', ' ', ' '}; extern GlobalMemory CacheCxt; ! sprintf(str, "select 1 from %.*s where %s", NAMEDATALEN, rel->rd_rel->relname.data, check->ccsrc); setheapoverride(true); planTree_list = (List *) pg_parse_and_plan(str, NULL, 0, &queryTree_list, None, FALSE); --- 1515,1524 ---- char nulls[4] = {' ', ' ', ' ', ' '}; extern GlobalMemory CacheCxt; ! /* Check for table's existance. Surround table name with double-quotes ! * to allow mixed-case and whitespace names. - thomas 1998-11-12 ! */ ! sprintf(str, "select 1 from \"%.*s\" where %s", NAMEDATALEN, rel->rd_rel->relname.data, check->ccsrc); setheapoverride(true); planTree_list = (List *) pg_parse_and_plan(str, NULL, 0, &queryTree_list, None, FALSE);
В списке pgsql-hackers по дате отправления: