Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid
authorTom Lane <[email protected]>
Sun, 13 Nov 2005 19:12:05 +0000 (19:12 +0000)
committerTom Lane <[email protected]>
Sun, 13 Nov 2005 19:12:05 +0000 (19:12 +0000)
commita43b13b90551d7ab5d3cf838099b0ff459fcb286
treee1da78eff6e289a560f7c861b7513eddd575b976
parent7948ac46bd42fe24542c92ec085fc9e12523b171
Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid
surprising results when it's some other numeric type.  This doesn't solve
the generic problem of surprising implicit casts to text, but it's a
low-impact way of making sure this particular case behaves sanely.
Per gripe from Harald Fuchs and subsequent discussion.
src/backend/parser/gram.y