mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix temp name length.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.52 1998/07/12 23:41:18 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.53 1998/07/20 11:28:12 momjian Exp $
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
* heap_create() - Create an uncataloged heap relation
|
* heap_create() - Create an uncataloged heap relation
|
||||||
@ -178,7 +178,7 @@ heap_create(char *name,
|
|||||||
int len;
|
int len;
|
||||||
bool nailme = false;
|
bool nailme = false;
|
||||||
char *relname = name;
|
char *relname = name;
|
||||||
char tempname[40];
|
char tempname[NAMEDATALEN];
|
||||||
int isTemp = 0;
|
int isTemp = 0;
|
||||||
int natts = tupDesc->natts;
|
int natts = tupDesc->natts;
|
||||||
|
|
||||||
@ -243,6 +243,7 @@ heap_create(char *name,
|
|||||||
if (name[0] == '\0')
|
if (name[0] == '\0')
|
||||||
{
|
{
|
||||||
sprintf(tempname, "temp_%d", relid);
|
sprintf(tempname, "temp_%d", relid);
|
||||||
|
Assert(strlen(tempname) < NAMEDATALEN);
|
||||||
relname = tempname;
|
relname = tempname;
|
||||||
isTemp = 1;
|
isTemp = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user