From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "efesar" <efesar(at)nmia(dot)com>, "Pgadmin-Hackers" <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: PGA3 Operator Question |
Date: | 2003-04-03 08:08:33 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B88602@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
> -----Original Message-----
> From: efesar [mailto:efesar(at)nmia(dot)com]
> Sent: 03 April 2003 01:52
> To: Pgadmin-Hackers
> Subject: [pgadmin-hackers] PGA3 Operator Question
>
>
> Dave et al,
>
> * This is a temporary solution until the cache is built.
>
> I need to get a list of operators from the database that will
> return only booleans types, not integer types. This is
> basically a list of possible "join" operators.
>
> This is the query I've found works the best. Do namespaces
> matter here? Can anybody suggest a better query?
>
> SELECT DISTINCT
> a.oprname
> FROM
> pg_operator a
> JOIN
> pg_type b on ( a.oprresult = b.oid )
> WHERE
> a.oprkind = 'b' and b.typname = 'bool'
> ORDER BY
> a.oprname
Hi Keith,
Namespaces do matter because unless the opr is in the search path then
it won't be found, and even then, if there are 2 in different schemas
then the search path will determine which is to be used unless they are
qualified (ie. OPERATOR(pg_catalog.+) ).
Query looks OK at a cursory examination.
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2003-04-03 08:09:32 | Re: problem compilation pgadmin2 |
Previous Message | Dave Page | 2003-04-03 08:01:36 | Re: pgadmin3 query tools |