diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-01-22 14:20:56 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-01-22 14:20:56 +0000 |
commit | fa5400c0a40eab95499da5a54d8a526593a1f243 (patch) | |
tree | a3f2e20f0822b7cb850d51045c19e4f22cc5acb0 /src/backend/utils/cache | |
parent | 3f51bdafdca99e7f30c7198c218e66fe009a3dd9 (diff) | |
download | postgresql-fa5400c0a40eab95499da5a54d8a526593a1f243.tar.gz postgresql-fa5400c0a40eab95499da5a54d8a526593a1f243.zip |
added ALTER TABLE DROP COLUMN, early version
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 18 | ||||
-rw-r--r-- | src/backend/utils/cache/temprel.c | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index ed11b77325d..a6b0f6ca9be 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.85 2000/01/15 02:59:39 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.86 2000/01/22 14:20:50 petere Exp $ * *------------------------------------------------------------------------- */ @@ -62,7 +62,7 @@ static void RelationClearRelation(Relation relation, bool rebuildIt); static void RelationFlushRelation(Relation *relationPtr, bool onlyFlushReferenceCountZero); -static Relation RelationNameCacheGetRelation(char *relationName); +static Relation RelationNameCacheGetRelation(const char *relationName); static void RelationCacheAbortWalker(Relation *relationPtr, int dummy); static void init_irels(void); @@ -1067,7 +1067,7 @@ RelationIdCacheGetRelation(Oid relationId) * -------------------------------- */ static Relation -RelationNameCacheGetRelation(char *relationName) +RelationNameCacheGetRelation(const char *relationName) { Relation rd; NameData name; @@ -1144,7 +1144,7 @@ RelationIdGetRelation(Oid relationId) * -------------------------------- */ Relation -RelationNameGetRelation(char *relationName) +RelationNameGetRelation(const char *relationName) { char *temprelname; Relation rd; @@ -1180,7 +1180,7 @@ RelationNameGetRelation(char *relationName) * ---------------- */ buildinfo.infotype = INFO_RELNAME; - buildinfo.i.info_name = relationName; + buildinfo.i.info_name = (char *)relationName; rd = RelationBuildDesc(buildinfo, NULL); return rd; @@ -1727,7 +1727,7 @@ AttrDefaultFetch(Relation relation) if (adform->adnum != attrdef[i].adnum) continue; if (attrdef[i].adbin != NULL) - elog(ERROR, "AttrDefaultFetch: second record found for attr %s in rel %s", + elog(NOTICE, "AttrDefaultFetch: second record found for attr %s in rel %s", NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), RelationGetRelationName(relation)); @@ -1735,7 +1735,7 @@ AttrDefaultFetch(Relation relation) Anum_pg_attrdef_adbin, adrel->rd_att, &isnull); if (isnull) - elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s", + elog(NOTICE, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s", NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname), RelationGetRelationName(relation)); attrdef[i].adbin = textout(val); @@ -1744,13 +1744,13 @@ AttrDefaultFetch(Relation relation) ReleaseBuffer(buffer); if (i >= ndef) - elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %s", + elog(NOTICE, "AttrDefaultFetch: unexpected record found for attr %d in rel %s", adform->adnum, RelationGetRelationName(relation)); } if (found < ndef) - elog(ERROR, "AttrDefaultFetch: %d record not found for rel %s", + elog(NOTICE, "AttrDefaultFetch: %d record not found for rel %s", ndef - found, RelationGetRelationName(relation)); index_endscan(sd); diff --git a/src/backend/utils/cache/temprel.c b/src/backend/utils/cache/temprel.c index 23ac1aadbcf..88894a806e6 100644 --- a/src/backend/utils/cache/temprel.c +++ b/src/backend/utils/cache/temprel.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.18 1999/12/10 03:56:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.19 2000/01/22 14:20:50 petere Exp $ * *------------------------------------------------------------------------- */ @@ -49,7 +49,7 @@ typedef struct TempTable void -create_temp_relation(char *relname, HeapTuple pg_class_tuple) +create_temp_relation(const char *relname, HeapTuple pg_class_tuple) { MemoryContext oldcxt; TempTable *temp_rel; @@ -202,7 +202,7 @@ invalidate_temp_relations(void) } char * -get_temp_rel_by_username(char *user_relname) +get_temp_rel_by_username(const char *user_relname) { List *l; @@ -217,7 +217,7 @@ get_temp_rel_by_username(char *user_relname) } char * -get_temp_rel_by_physicalname(char *relname) +get_temp_rel_by_physicalname(const char *relname) { List *l; @@ -229,5 +229,5 @@ get_temp_rel_by_physicalname(char *relname) return temp_rel->user_relname; } /* needed for bootstrapping temp tables */ - return relname; + return pstrdup(relname); } |