From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | "It'd be better if there were not an implicit cast from int8 to text..." |
Date: | 2007-08-18 15:47:58 |
Message-ID: | 87tzqwsv2p.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hm, I suppose this "kluge" in gram.y for "substr_list" isn't necessary any
more? Don't really see a downside to leaving it, just thought I would mention
it since I noticed the comment is outdated.
| a_expr substr_for
{
/*
* Since there are no cases where this syntax allows
* a textual FOR value, we forcibly cast the argument
* to int4. This is a kluge to avoid surprising results
* when the argument is, say, int8. It'd be better if
* there were not an implicit cast from int8 to text ...
*/
A_Const *n = makeNode(A_Const);
n->val.type = T_Integer;
n->val.val.ival = 1;
$$ = list_make3($1, (Node *) n,
makeTypeCast($2, SystemTypeName("int4")));
}
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-08-18 16:24:53 | Re: tsearch2 in PostgreSQL 8.3?f |
Previous Message | Merlin Moncure | 2007-08-18 14:46:53 | Re: pgparam extension to the libpq api |