Skip site navigation (1) Skip section navigation (2)

Re: Should creating a new base type require superuser status?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should creating a new base type require superuser status?
Date: 2008-07-30 22:13:10
Message-ID: 24287.1217455990@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> Unless you're going to allow them to create new C functions, I'm not
>> clear on how much they're going to be able to change the semantics.

> Well there's plenty that can be done just using text or bytea as
> representations. citext, or uuid for example.

For the sort of look-ma-no-C programming that you seem to be
envisioning, I don't think that real base types are appropriate at all.
What might make sense is to handle it as a domain over some
suitably-generic base type.  The thing we'd have to fix to make that
work is the way that the ambiguous-function resolution rules
discriminate against functions that're declared to take domains.
Which is hard, but it seems a lot less likely to lead to weird
security risks than letting untrusted users mess with the details
of base-type operations.

Elein was going to go off in a corner and think about how to make that
work better, but I dunno if she's gotten anywhere yet.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2008-07-30 22:57:22
Subject: Re: printing raw parse tree
Previous:From: Alvaro HerreraDate: 2008-07-30 22:07:53
Subject: Re: Should creating a new base type require superuserstatus?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group