Re: Add support for AT LOCAL
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Vik Fearing <vik@postgresfriends.org>
Cc: cary huang <hcary328@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-10-03T23:28:02Z
Lists: pgsql-hackers
On Tue, Oct 03, 2023 at 02:10:48AM +0200, Vik Fearing wrote: > On 9/29/23 09:27, Michael Paquier wrote: >> As the deparsing code introduced by this patch is showing, this leads >> to a lot of extra complexity. And, actually, this can be quite >> expensive as well with these two layers of functions. Note also that >> in comparison to SQLValueFunctions, COERCE_SQL_SYNTAX does less >> inlining. So here comes my question: why doesn't this stuff just use >> one underlying function to do this job? > > I guess I don't understand the question. Why do you think a single function > that repeats what these functions do would be preferable? I am not sure how > doing it a different way would be better. Leaving aside the ruleutils.c changes introduced by the patch that are quite confusing, having one function in the executor stack is going to be more efficient than two (aka less ExecInitFunc), and this syntax could be used in SQL queries where the operations is repeated a lot. This patch introduces two COERCE_SQL_SYNTAX, meaning that we would do twice the ACL check, twice the function hook, etc, so this could lead to significant differences. I think that we should be careful with the approach taken, and do benchmarks to choose an efficient approach from the start. See for example: https://www.postgresql.org/message-id/ZGHBGE45jKW8FEpe@paquier.xyz -- Michael
Commits
-
Dodge a compiler bug affecting timetz_zone/timetz_izone.
- f4f55d5124a9 13.13 landed
- e98f47d570a2 11.22 landed
- d8c2877b9efa 12.17 landed
- 85c9dda81887 14.10 landed
- 5463319acd19 15.5 landed
- 1ad3a7bd396a 16.1 landed
- 19fa977311b9 17.0 landed
-
Back-patch test cases for timetz_zone/timetz_izone.
- fdf8b70a51cf 13.13 landed
- dc159b95d921 14.10 landed
- b18781c2df44 12.17 landed
- 4a427b82cf19 16.1 landed
- 29231dbd40cb 15.5 landed
- 05b4614decac 11.22 landed
-
Add regression test coverage for timetz_izone().
- 2f047203074c 17.0 landed
-
Add support for AT LOCAL
- 97957fdbaa42 17.0 landed
-
doc: Mention timezone(zone, time) in section for AT TIME ZONE
- 7e1f544827ec 17.0 landed
-
Use HASH_BLOBS for xidhash.
- a1b8aa1e4eec 14.0 cited