]> git.ipfire.org Git - thirdparty/postgresql.git/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:28 +0000 (19:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Nov 2005 19:11:28 +0000 (19:11 +0000)
commitb31eeadcab26fdced0278fbd1e7dd87775960bb3
treec245e8a005e93d5dddd1c0c5af1c65604ddbd5a4
parent19cb4571465024d7068eddf3eda8c9fe6851cde1
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