]> granicus.if.org Git - postgresql/commit
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:11:45 +0000 (19:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Nov 2005 19:11:45 +0000 (19:11 +0000)
commitf82df77c9d7e443796bf730f4277e730c514863c
tree01a36a4d348d144da6bfc8acbf4c3cf1d184f5aa
parent53de65af495167fb99f68f392bad712aff9c533c
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