mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Remove 16 char limit on system table/index names. Rename system indexes.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.26 1997/09/18 20:20:04 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.27 1997/11/17 16:58:55 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -480,8 +480,8 @@ boot_openrel(char *relname)
|
||||
HeapScanDesc sdesc;
|
||||
HeapTuple tup;
|
||||
|
||||
if (strlen(relname) > 15)
|
||||
relname[15] = '\000';
|
||||
if (strlen(relname) >= NAMEDATALEN-1)
|
||||
relname[NAMEDATALEN-1] = '\0';
|
||||
|
||||
if (Typ == (struct typmap **) NULL)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.12 1997/09/18 20:20:27 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.13 1997/11/17 16:58:59 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -117,28 +117,16 @@ DefineVirtualRelation(char *relname, List *tlist)
|
||||
* Given a view name, returns the name for the 'on retrieve to "view"'
|
||||
* rule.
|
||||
* This routine is called when defining/removing a view.
|
||||
*
|
||||
* NOTE: it quarantees that the name is at most 15 chars long
|
||||
*
|
||||
* XXX it also means viewName cannot be 16 chars long! - ay 11/94
|
||||
*------------------------------------------------------------------
|
||||
*/
|
||||
char *
|
||||
MakeRetrieveViewRuleName(char *viewName)
|
||||
{
|
||||
/*
|
||||
char buf[100];
|
||||
|
||||
MemSet(buf, 0, sizeof(buf));
|
||||
sprintf(buf, "_RET%.*s", NAMEDATALEN, viewName->data);
|
||||
buf[15] = '\0';
|
||||
namestrcpy(rule_name, buf);
|
||||
*/
|
||||
|
||||
char *buf;
|
||||
|
||||
buf = palloc(strlen(viewName) + 5);
|
||||
sprintf(buf, "_RET%s", viewName);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.26 1997/09/12 04:08:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.27 1997/11/17 16:59:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -216,7 +216,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
|
||||
Const *adt;
|
||||
Datum lcp;
|
||||
Type tp;
|
||||
char type_string[16];
|
||||
char type_string[NAMEDATALEN];
|
||||
int32 len;
|
||||
char *cp = NULL;
|
||||
char *const_string = NULL;
|
||||
|
||||
4
src/backend/utils/cache/inval.c
vendored
4
src/backend/utils/cache/inval.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.8 1997/09/08 21:48:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.9 1997/11/17 16:59:22 momjian Exp $
|
||||
*
|
||||
* Note - this code is real crufty...
|
||||
*
|
||||
@@ -591,7 +591,7 @@ SetRefreshWhenInvalidate(bool on)
|
||||
*/
|
||||
#ifdef INVALIDDEBUG
|
||||
#define RelationInvalidateHeapTuple_DEBUG1 \
|
||||
elog(DEBUG, "RelationInvalidateHeapTuple(%.16s, [%d,%d])", \
|
||||
elog(DEBUG, "RelationInvalidateHeapTuple(%s, [%d,%d])", \
|
||||
RelationGetRelationName(relation), \
|
||||
ItemPointerGetBlockNumber(&tuple->t_ctid), \
|
||||
ItemPointerGetOffsetNumber(&tuple->t_ctid))
|
||||
|
||||
4
src/backend/utils/cache/lsyscache.c
vendored
4
src/backend/utils/cache/lsyscache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.6 1997/09/08 21:48:51 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.7 1997/11/17 16:59:23 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Eventually, the index information should go through here, too.
|
||||
@@ -148,7 +148,7 @@ get_attisset(Oid relid, char *attname)
|
||||
PointerGetDatum(attname),
|
||||
0, 0);
|
||||
if (!HeapTupleIsValid(htup))
|
||||
elog(WARN, "get_attisset: no attribute %.16s in relation %d",
|
||||
elog(WARN, "get_attisset: no attribute %s in relation %d",
|
||||
attname, relid);
|
||||
if (heap_attisnull(htup, attno))
|
||||
return (false);
|
||||
|
||||
4
src/backend/utils/cache/relcache.c
vendored
4
src/backend/utils/cache/relcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.27 1997/11/02 15:26:06 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.28 1997/11/17 16:59:25 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -366,7 +366,7 @@ scan_pg_rel_seq(RelationBuildDescInfo buildinfo)
|
||||
case INFO_RELNAME:
|
||||
ScanKeyEntryInitialize(&key, 0,
|
||||
Anum_pg_class_relname,
|
||||
Character16EqualRegProcedure,
|
||||
NameEqualRegProcedure,
|
||||
NameGetDatum(buildinfo.i.info_name));
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user