How to add new tokens into PostgreSQL? -
i add more tokens such open postgresql, procedure should follow? did not find corresponding documents. thanks.
(assuming mean "the postgresql server" not "the command line client psql
, "token" mean "sql command / statement type"):
... yeah, that's not super simple.
if it's utility command not require query planning isn't super hard. can take existing utility commands guidance on how work. they're quite different though. start processutility
.
if it's intended produce query plan, select
, insert
, update
, delete
, create table as
, etc ... well, tends lot more complicated.
this sort of thing require quality time reading postgresql source code , developer documentation. it's way complex give step-by-step how-to here, since have not explained command wish add supposed do.
if @ possible should develop functionality need user defined function first. start pl/pgsql, pl/perl, or whatever, , if hit limitations of develop c extension.
once have functionality want c functions, then think whether makes sense extend actual sql syntax.
Comments
Post a Comment