Re: Bug: citext not working in non-public schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anders Steinlein <anders(at)steinlein(dot)no>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug: citext not working in non-public schema
Date: 2010-10-25 22:51:40
Message-ID: 8155.1288047100@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Anders Steinlein <anders(at)steinlein(dot)no> writes:
> http://archives.postgresql.org/pgsql-bugs/2010-03/msg00058.php

> This bit us hard (on PostgreSQL 8.4.4). We have a custom domain for
> email addresses based on citext, placed in the public schema, while each
> user of our application has their own private schemas. The search path
> is set to their private schemas, and the few queries which required
> explicit access to the type prefixes the type with the public schema,
> i.e. WHERE 'text(at)example(dot)com'::public.email = email_column.

Put the citext stuff in a schema that *is* in everyone's search path.
It doesn't have to be "public", but it does have to be visible.

> Any possibility of getting this fixed? Obliviously I would prefer citext
> to work as advertised across schemas. If not, an out-right error thrown
> would be much better and consistent than the current situation.

The only way to have an error be thrown would be if you remove the
implicit cast from citext to text ... which is going to be a far worse
notational pain in the rear than fixing your search_path.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2010-10-25 22:52:55 Re: Composite Types and Function Parameters
Previous Message Greg 2010-10-25 22:38:23 Re: Composite Types and Function Parameters