forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit48c5c90
committed
Use the "pg_temp" schema alias in EXPLAIN and related output.
This patch causes EXPLAIN output to refer to objects that are inthe current session's temp schema with the "pg_temp" schema aliasrather than that schema's actual name. This is useful for our owntesting purposes since it will stabilize EXPLAIN VERBOSE outputfor such cases, allowing us to use that in regression tests.It should be less confusing for end users too.Since ruleutils.c needs to change behavior for this, the changealso leaks into a few other users of ruleutils.c, for examplepg_get_viewdef(). AFAICS that won't cause any problems.We did find that aggressively trying to change this behavioracross-the-board would cause issues, but as long as "pg_temp"only appears within generated SQL text, I think it'll be fine.Along the way, make get_namespace_name_or_temp conform to thesame API as get_namespace_name, ie that it returns a palloc'dstring or NULL. The current behavior hasn't caused any bugssince no callers attempt to pfree the result, but if it getsmore widespread usage that could become a problem.Amul Sul, reviewed and extended by meDiscussion:https://postgr.es/m/CAAJ_b97W=QaGmag9AhWNbmx3uEYsNkXWL+OVW1_E1D3BtgWvtw@mail.gmail.com1 parent91d7661 commit48c5c90
File tree
6 files changed
+36
-15
lines changed- contrib/postgres_fdw
- src
- backend
- commands
- utils
- adt
- cache
- test/regress
- expected
- sql
6 files changed
+36
-15
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2854 | 2854 |
| |
2855 | 2855 |
| |
2856 | 2856 |
| |
2857 |
| - | |
| 2857 | + | |
2858 | 2858 |
| |
2859 | 2859 |
| |
2860 | 2860 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3747 | 3747 |
| |
3748 | 3748 |
| |
3749 | 3749 |
| |
3750 |
| - | |
| 3750 | + | |
3751 | 3751 |
| |
3752 | 3752 |
| |
3753 | 3753 |
| |
| |||
3774 | 3774 |
| |
3775 | 3775 |
| |
3776 | 3776 |
| |
3777 |
| - | |
3778 |
| - | |
| 3777 | + | |
3779 | 3778 |
| |
3780 | 3779 |
| |
3781 | 3780 |
| |
|
Lines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1617 | 1617 |
| |
1618 | 1618 |
| |
1619 | 1619 |
| |
1620 |
| - | |
| 1620 | + | |
1621 | 1621 |
| |
1622 | 1622 |
| |
1623 | 1623 |
| |
| |||
2811 | 2811 |
| |
2812 | 2812 |
| |
2813 | 2813 |
| |
2814 |
| - | |
| 2814 | + | |
2815 | 2815 |
| |
2816 | 2816 |
| |
2817 | 2817 |
| |
| |||
11183 | 11183 |
| |
11184 | 11184 |
| |
11185 | 11185 |
| |
11186 |
| - | |
| 11186 | + | |
11187 | 11187 |
| |
11188 | 11188 |
| |
11189 | 11189 |
| |
| |||
11495 | 11495 |
| |
11496 | 11496 |
| |
11497 | 11497 |
| |
11498 |
| - | |
| 11498 | + | |
11499 | 11499 |
| |
11500 | 11500 |
| |
11501 | 11501 |
| |
| |||
11527 | 11527 |
| |
11528 | 11528 |
| |
11529 | 11529 |
| |
11530 |
| - | |
| 11530 | + | |
11531 | 11531 |
| |
11532 | 11532 |
| |
11533 | 11533 |
| |
| |||
11639 | 11639 |
| |
11640 | 11640 |
| |
11641 | 11641 |
| |
11642 |
| - | |
| 11642 | + | |
11643 | 11643 |
| |
11644 | 11644 |
| |
11645 | 11645 |
| |
| |||
11702 | 11702 |
| |
11703 | 11703 |
| |
11704 | 11704 |
| |
11705 |
| - | |
| 11705 | + | |
11706 | 11706 |
| |
11707 | 11707 |
| |
11708 | 11708 |
| |
| |||
11790 | 11790 |
| |
11791 | 11791 |
| |
11792 | 11792 |
| |
11793 |
| - | |
| 11793 | + | |
11794 | 11794 |
| |
11795 | 11795 |
| |
11796 | 11796 |
| |
| |||
11822 | 11822 |
| |
11823 | 11823 |
| |
11824 | 11824 |
| |
11825 |
| - | |
| 11825 | + | |
11826 | 11826 |
| |
11827 | 11827 |
| |
11828 | 11828 |
| |
| |||
11856 | 11856 |
| |
11857 | 11857 |
| |
11858 | 11858 |
| |
11859 |
| - | |
| 11859 | + | |
11860 | 11860 |
| |
11861 | 11861 |
| |
11862 | 11862 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3340 | 3340 |
| |
3341 | 3341 |
| |
3342 | 3342 |
| |
3343 |
| - | |
| 3343 | + | |
3344 | 3344 |
| |
3345 | 3345 |
| |
3346 | 3346 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
480 | 493 |
| |
481 | 494 |
| |
482 | 495 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
107 | 116 |
| |
108 | 117 |
|
0 commit comments
Comments
(0)