mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Further cleanups for relations in schemas: teach nextval and other
sequence functions how to cope with qualified names. Same code is also used for int4notin, currtid_byrelname, pgstattuple. Also, move TOAST tables into special pg_toast namespace.
This commit is contained in:
@@ -8,14 +8,13 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.38 2002/03/29 19:06:12 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.39 2002/03/30 01:02:41 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include "catalog/namespace.h"
|
||||
#include "catalog/pg_namespace.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "lib/stringinfo.h"
|
||||
#include "miscadmin.h"
|
||||
@@ -132,6 +131,7 @@ LookupTypeName(const TypeName *typename)
|
||||
|
||||
if (schemaname)
|
||||
{
|
||||
/* Look in specific schema only */
|
||||
Oid namespaceId;
|
||||
|
||||
namespaceId = GetSysCacheOid(NAMESPACENAME,
|
||||
@@ -147,11 +147,8 @@ LookupTypeName(const TypeName *typename)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* XXX wrong, should use namespace search */
|
||||
restype = GetSysCacheOid(TYPENAMENSP,
|
||||
PointerGetDatum(typname),
|
||||
ObjectIdGetDatum(PG_CATALOG_NAMESPACE),
|
||||
0, 0);
|
||||
/* Unqualified type name, so search the search path */
|
||||
restype = TypenameGetTypid(typname);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user