News for hackers. Stuff that matters.
Re:Following a Select Statement Through Postgres Internals by sanderjd on Monday October 13, 2014 @02:17PM (#8449833)
That's one possibility. Another would be for a client to transfer an encoding of a query that can be cheaply decoded, instead of requiring parsing. The translation of a query from an application AST to that encoding could skip the SQL representation altogether!

Of course this sort of approach would give up the (debatable) interoperability capabilities of SQL and I'm not sure parsing is enough of a bottleneck for it to really be worthwhile. A "binary SQL" spec would also be interesting (and maybe exists already?).

Re:Following a Select Statement Through Postgres Internals by yangyang on Monday October 13, 2014 @05:10PM (#8450694)
The time taken parsing the query is insignificant compared to the time planning.

Not sure if it's exactly what you're getting at, but SQL Server has a "USE PLAN" hint that lets you set the entire query plan (using an XML string).

PostgreSQL's policy is strongly against hints, so we're unlikely to see anything like that in Postgres.

Re:Following a Select Statement Through Postgres Internals by sanderjd on Tuesday October 14, 2014 @02:10PM (#8454797)
I was purely talking about "pre-compiling" the queries themselves, so it would only effect parsing, not planning. I have no trouble at all believing that this would be a totally negligible improvement.