aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-02-11 08:47:38 -0500
committerRobert Haas <rhaas@postgresql.org>2011-02-11 08:47:38 -0500
commit2c20ba1fd284423e4652f2f6855d257339245e97 (patch)
tree12f6b4f0af1bf8ae228039e64533bdcf9f6954f5 /src/backend/commands/typecmds.c
parent61cf7bcdf76a2a32d2400a116c8da48d5fd4d3a2 (diff)
downloadpostgresql-2c20ba1fd284423e4652f2f6855d257339245e97.tar.gz
postgresql-2c20ba1fd284423e4652f2f6855d257339245e97.zip
Tweak find_composite_type_dependencies API a bit more.
Per discussion with Noah Misch, the previous coding, introduced by my commit 65377e0b9c0e0397b1598b38b6a7fb8b6f740d39 on 2011-02-06, was really an abuse of RELKIND_COMPOSITE_TYPE, since the caller in typecmds.c is actually passing the name of a domain. So go back having a type name argument, but make the first argument a Relation rather than just a string so we can tell whether it's a table or a foreign table and emit the proper error message.
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index fb9d67a30a5..f9da7816b25 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -2196,7 +2196,7 @@ get_rels_with_domain(Oid domainOid, LOCKMODE lockmode)
*/
if (OidIsValid(rel->rd_rel->reltype))
find_composite_type_dependencies(rel->rd_rel->reltype,
- RELKIND_COMPOSITE_TYPE,
+ NULL,
format_type_be(domainOid));
/* Otherwise we can ignore views, composite types, etc */