| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: proposal: regrole type? |
| Date: | 2012-12-25 18:57:52 |
| Message-ID: | 23617.1356461872@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> * We can reduce to half lot of functions \df has_* (84 functions)
Not without breaking existing queries. A function taking regrole might
look like it substitutes for one taking a text-string user name as long
as you only pass literal constants to it, but as soon as you pass
non-constants you'll find out different. (Unless your plan is to also
create an implicit cast from text to regrole, which strikes me as a
seriously bad idea.)
The reason we've not been more aggressive about using the OID-alias
pseudotypes is exactly that they're not a cure-all. Otherwise we would
already have about a dozen more of them. I don't think it's really
worth it: the notational savings is pretty marginal and the impact on
application namespace should not be ignored. (Keep in mind that any new
system type causes problems for similarly-named user tables.)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2012-12-26 07:25:05 | Re: proposal: regrole type? |
| Previous Message | Pavel Stehule | 2012-12-25 18:44:14 | Re: proposal: regrole type? |