| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | kengruven(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Shadowing type names because I am not smart |
| Date: | 2026-07-30 11:37:11 |
| Message-ID: | 4c14509f86ced6f29ed50a18127610fac2553292.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Wed, 2026-07-29 at 22:19 +0000, PG Doc comments form wrote:
> When playing around, I accidentally created a composite type called "text",
> and this caused all kinds of trouble that took a while for me to sort out.
> (Some GUI clients really don't behave nicely in this situation.) Even after
> I realized what I'd done, I found that it behaved in strange ways that
> differed from user type names which shadow other built-in type names.
I'd say that's a problem of the schema search path: the system schema
pg_catalog is *always* on "search_path", and by default at the beginning.
To access your custom created type, you'd have to schema-qualify it:
DROP TYPE public.text;
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2026-07-30 12:45:58 | Re: Shadowing type names because I am not smart |
| Previous Message | PG Doc comments form | 2026-07-29 22:19:06 | Shadowing type names because I am not smart |