Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 083e6a1

Browse files
committed
remove function get_attribute_type()
1 parent 988fe9a commit 083e6a1

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/include/utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ List * list_reverse(List *l);
3737
*/
3838
Oid get_rel_owner(Oid relid);
3939
char * get_rel_name_or_relid(Oid relid);
40-
Oid get_attribute_type(Oid relid, const char *attname, bool missing_ok);
4140
RangeVar *makeRangeVarFromRelid(Oid relid);
4241

4342
/*

src/utils.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -193,34 +193,6 @@ get_rel_name_or_relid(Oid relid)
193193
return relname;
194194
}
195195

196-
/*
197-
* Get type of column by its name.
198-
*/
199-
Oid
200-
get_attribute_type(Oid relid, const char *attname, bool missing_ok)
201-
{
202-
Oid result;
203-
HeapTuple tp;
204-
205-
/* NOTE: for now it's the most efficient way */
206-
tp = SearchSysCacheAttName(relid, attname);
207-
if (HeapTupleIsValid(tp))
208-
{
209-
Form_pg_attribute att_tup = (Form_pg_attribute) GETSTRUCT(tp);
210-
result = att_tup->atttypid;
211-
ReleaseSysCache(tp);
212-
213-
return result;
214-
}
215-
216-
if (!missing_ok)
217-
elog(ERROR, "cannot find type name for attribute \"%s\" "
218-
"of relation \"%s\"",
219-
attname, get_rel_name_or_relid(relid));
220-
221-
return InvalidOid;
222-
}
223-
224196
RangeVar *
225197
makeRangeVarFromRelid(Oid relid)
226198
{

0 commit comments

Comments
 (0)