Re: phasing out pg_pltemplate?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: phasing out pg_pltemplate?
Date: 2018-02-22 15:37:55
Message-ID: 3615.1519313875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> What is the plan for pg_pltemplate? Is there a roadmap to get rid of
> it? (It's not currently blocking anything for me. I'm just wondering.)

I think it's just waiting for someone to put in the effort to make it
unnecessary.

It seems like the extension mechanism could supersede it now, by switching
to a convention where the CREATE LANGUAGE command in the extension script
specifies all the language parameters explicitly. But we would need to do
something extra to replace the functionality of tmpldbacreate --- perhaps
another extension control file flag? Or maybe it'd be good enough to
hard-wire the db-owner-can-create behavior as enabled by TRUSTED, since
tmpltrusted = tmpldbacreate in every existing row.

One thing we'd have to address is how to not choke on old dump scripts
that contain "CREATE LANGUAGE foo" rather than CREATE EXTENSION.
I wonder if we could finesse that by redefining CREATE LANGUAGE with
no parameters as equivalent to CREATE EXTENSION.

pg_upgrade'ing across such a change might pose some challenges too,
not sure.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-02-22 15:45:45 Re: Hash Joins vs. Bloom Filters / take 2
Previous Message David Rowley 2018-02-22 15:11:59 Re: [HACKERS] Runtime Partition Pruning