File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -940,6 +940,12 @@ SPI_gettype(TupleDesc tupdesc, int fnumber)
940940 return result ;
941941}
942942
943+ /*
944+ * Get the data type OID for a column.
945+ *
946+ * There's nothing similar for typmod and typcollation. The rare consumers
947+ * thereof should inspect the TupleDesc directly.
948+ */
943949Oid
944950SPI_gettypeid (TupleDesc tupdesc , int fnumber )
945951{
Original file line number Diff line number Diff line change @@ -4446,7 +4446,6 @@ exec_eval_datum(PLpgSQL_execstate *estate,
44464446 errmsg ("record \"%s\" has no field \"%s\"" ,
44474447 rec -> refname , recfield -> fieldname )));
44484448 * typeid = SPI_gettypeid (rec -> tupdesc , fno );
4449- /* XXX there's no SPI_gettypmod, for some reason */
44504449 if (fno > 0 )
44514450 * typetypmod = rec -> tupdesc -> attrs [fno - 1 ]-> atttypmod ;
44524451 else
@@ -4623,12 +4622,10 @@ exec_get_datum_type_info(PLpgSQL_execstate *estate,
46234622 errmsg ("record \"%s\" has no field \"%s\"" ,
46244623 rec -> refname , recfield -> fieldname )));
46254624 * typeid = SPI_gettypeid (rec -> tupdesc , fno );
4626- /* XXX there's no SPI_gettypmod, for some reason */
46274625 if (fno > 0 )
46284626 * typmod = rec -> tupdesc -> attrs [fno - 1 ]-> atttypmod ;
46294627 else
46304628 * typmod = -1 ;
4631- /* XXX there's no SPI_getcollation either */
46324629 if (fno > 0 )
46334630 * collation = rec -> tupdesc -> attrs [fno - 1 ]-> attcollation ;
46344631 else /* no system column types have collation */
You can’t perform that action at this time.
0 commit comments