From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Convert pltcl from strings to objects |
Date: | 2016-02-09 22:23:21 |
Message-ID: | 56BA66D9.3030506@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Currently, pl/tcl is implemented through nothing but string
manipulation. In other words, the C code is effectively creating a giant
string that the tcl interpreter must re-parse every time the function is
executed. Additionally, all arguments are treated as raw strings,
instead of the far more efficient internal tcl object types.
The biggest win comes with how pltcl interfaces with SPI result sets.
Currently, the entire chunk of tcl code that is executed for each result
row must be reparsed and recompiled from scratch. Now, the code is
compiled once and the bytecode is stored.
This work is sponsored by Flight Aware (http://flightaware.com/)
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
Attachment | Content-Type | Size |
---|---|---|
pltcl_objects.patch | text/plain | 40.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-02-09 22:31:39 | Re: proposal: schema PL session variables |
Previous Message | Corey Huinker | 2016-02-09 22:13:44 | Re: proposal: schema PL session variables |