Commit a03ec09
anju15bharti
fix: Use full ENR name for temp tables in ATParseTransformCmd
ATParseTransformCmd reconstructs the AlterTableStmt RangeVar from
RelationGetRelationName(rel), which returns NameStr(rel->rd_rel->relname).
The Name type is capped at NAMEDATALEN-1 (63 chars), so temp table names
>= 64 chars get clipped. This causes subsequent RangeVarGetRelidExtended
calls to fail because the clipped name doesn't match the full name stored
in ENR.
Fix: For T-SQL #temp tables, look up the full untruncated name from ENR
using get_ENR_withoid and use it as the RangeVar relname instead.
Signed-off-by: anju15bharti <abanju@amazon.com>1 parent b3c9bac commit a03ec09
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5834 | 5834 | | |
5835 | 5835 | | |
5836 | 5836 | | |
| 5837 | + | |
| 5838 | + | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
| 5843 | + | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
5837 | 5854 | | |
5838 | 5855 | | |
5839 | 5856 | | |
| |||
0 commit comments