forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit314fb9b
committed
In psql's \d commands, don't truncate attribute default values.
Historically, psql has truncated the text of a column's defaultexpression at 128 characters. This is unlike any other behaviorin describe.c, and it's become particularly confusing now thatthe limit is only applied to the expression proper and not tothe "generated always as (...) stored" text that may get wrappedaround it.Excavation in our git history suggests that the original motivationfor this limit was not really to limit the display width (as I'd longsupposed), but to make it safe to use a fixed-width output buffer tostore the result. That implementation restriction is long gone ofcourse, but the limit remained. Let's just get rid of it.While here, rearrange the logic about when to free the output stringso that it's not so dependent on unstated assumptions about thepossible values of attidentity and attgenerated.Per bug #16743 from David Turon. Back-patch to v12 where GENERATEDcame in. (Arguably we could take it back further, but I'm hesitantto change the behavior of long-stable branches for this.)Discussion:https://postgr.es/m/16743-7b1bacc4af76e7ad@postgresql.org1 parent85b4ba7 commit314fb9b
1 file changed
+9
-5
lines changedLines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1842 | 1842 |
| |
1843 | 1843 |
| |
1844 | 1844 |
| |
1845 |
| - | |
| 1845 | + | |
1846 | 1846 |
| |
1847 | 1847 |
| |
1848 | 1848 |
| |
| |||
2045 | 2045 |
| |
2046 | 2046 |
| |
2047 | 2047 |
| |
2048 |
| - | |
| 2048 | + | |
| 2049 | + | |
2049 | 2050 |
| |
2050 | 2051 |
| |
2051 | 2052 |
| |
| |||
2061 | 2062 |
| |
2062 | 2063 |
| |
2063 | 2064 |
| |
2064 |
| - | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
2065 | 2070 |
| |
2066 |
| - | |
2067 | 2071 |
| |
2068 | 2072 |
| |
2069 |
| - | |
| 2073 | + | |
2070 | 2074 |
| |
2071 | 2075 |
| |
2072 | 2076 |
| |
|
0 commit comments
Comments
(0)