On Nov 28, 2007 9:49 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > > I had a bit of a dig into this. A_Const->typename gets set directly > > by the parse paths for "INTERVAL [(int)] string [interval range]". In > > fact, as far as I can tell that's the _only_ place A_Const->typename > > gets used at all. > > Uh, you missed quite a lot of others ... see CURRENT_DATE and a lot of > other productions. >
Thanks again. I missed those because they don't use makeStringConst(). Looking again, it turns out "many productions" is more like 15. That's a bigger number, certainly, but it's still manageable. It wouldn't be hard to convert them to generate a const-in-a-cast. In fact with the addition of a makeCastStringConst(), I think the code saving from A_Const->typename would be cancelled out. If the only reason for keeping A_Const->typename around is the alleged code saving (as indicated by the code comments), my offer to do away with it is still on the table. Regards, BJ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match