Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Nov 2005 19:12:05 +0000 (19:12 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Nov 2005 19:12:05 +0000 (19:12 +0000)
commitc7d40ff35fe3f203d166e999da42e6e150859a36
tree7601706ae3170cfcb113e345f8ee135e35b515b7
parent55b5a42b6a0408a6eff2aba35967914264fc5451
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