Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit083e6a1

Browse files
committed
remove function get_attribute_type()
1 parent988fe9a commit083e6a1

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
Oidget_rel_owner(Oidrelid);
3939
char*get_rel_name_or_relid(Oidrelid);
40-
Oidget_attribute_type(Oidrelid,constchar*attname,boolmissing_ok);
4140
RangeVar*makeRangeVarFromRelid(Oidrelid);
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
returnrelname;
194194
}
195195

196-
/*
197-
* Get type of column by its name.
198-
*/
199-
Oid
200-
get_attribute_type(Oidrelid,constchar*attname,boolmissing_ok)
201-
{
202-
Oidresult;
203-
HeapTupletp;
204-
205-
/* NOTE: for now it's the most efficient way */
206-
tp=SearchSysCacheAttName(relid,attname);
207-
if (HeapTupleIsValid(tp))
208-
{
209-
Form_pg_attributeatt_tup= (Form_pg_attribute)GETSTRUCT(tp);
210-
result=att_tup->atttypid;
211-
ReleaseSysCache(tp);
212-
213-
returnresult;
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-
returnInvalidOid;
222-
}
223-
224196
RangeVar*
225197
makeRangeVarFromRelid(Oidrelid)
226198
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp