postgresql/src/backend
Tom Lane bcf188a218 Fix SPI_getvalue and SPI_getbinval to range-check the given attribute number
according to the TupleDesc's natts, not the number of physical columns in the
tuple.  The previous coding would do the wrong thing in cases where natts is
different from the tuple's column count: either incorrectly report error when
it should just treat the column as null, or actually crash due to indexing off
the end of the TupleDesc's attribute array.  (The second case is probably not
possible in modern PG versions, due to more careful handling of inheritance
cases than we once had.  But it's still a clear lack of robustness here.)

The incorrect error indication is ignored by all callers within the core PG
distribution, so this bug has no symptoms visible within the core code, but
it might well be an issue for add-on packages.  So patch all the way back.
2008-10-16 13:23:21 +00:00
..
access Fix small query-lifespan memory leak introduced by 8.4 change in index AM API 2008-10-10 14:17:08 +00:00
bootstrap Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the 2008-09-30 10:52:14 +00:00
catalog Make the system-attributes loop in AddNewAttributeTuples depend on 2008-10-14 23:27:40 +00:00
commands Ensure that CLUSTER leaves the toast table and index with consistent names, 2008-10-14 17:19:50 +00:00
executor Fix SPI_getvalue and SPI_getbinval to range-check the given attribute number 2008-10-16 13:23:21 +00:00
lib Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
libpq Fix error messages from recent pg_hba parsing patch to use errcontext() 2008-09-15 20:55:04 +00:00
main Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
nodes Extend CTE patch to support recursive UNION (ie, without ALL). The 2008-10-07 19:27:04 +00:00
optimizer Improve the recently-added code for inlining set-returning functions so that 2008-10-09 19:27:40 +00:00
parser Implement comparison of generic records (composite types), and invent a 2008-10-13 16:25:20 +00:00
po Translation updates 2008-01-31 18:04:52 +00:00
port Fix a couple of bugs in win32 shmem name generation: 2008-07-04 10:50:18 +00:00
postmaster Fix oversight in the relation forks patch: forgot to copy fork number to 2008-10-14 08:06:39 +00:00
regex Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
rewrite When expanding a whole-row Var into a RowExpr during ResolveNew(), attach 2008-10-06 17:39:26 +00:00
snowball Implement a few changes to how shared libraries and dynamically loadable 2008-04-07 14:15:58 +00:00
storage Improve some of the comments in fsmpage.c. 2008-10-07 21:10:11 +00:00
tcop Fix omission of DiscardStmt in GetCommandLogLevel, per report from Hubert 2008-10-10 13:48:05 +00:00
tsearch Create a selectivity estimation function for the text search @@ operator. 2008-09-19 19:03:41 +00:00
utils Extend the date type to support infinity and -infinity, analogously to 2008-10-14 17:12:33 +00:00
common.mk Code coverage testing with gcov. Documentation is in the regression test 2008-09-05 12:11:18 +00:00
Makefile Remove all traces that suggest that a non-Bison yacc might be supported, and 2008-08-29 13:02:33 +00:00
nls.mk Add a new ereport auxiliary function errdetail_log(), which works the same as 2008-03-24 18:08:47 +00:00