From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_comments |
Date: | 2010-09-24 13:41:14 |
Message-ID: | 13599.1285335674@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com> writes:
> It seems to me the query should be fixed up as follows:
> :
> WHERE
> d.classoid = (SELECT oid FROM pg_class WHERE relname = 'pg_largeobject'
> AND relnamespace = (SELECT oid FROM pg_namespace
> WHERE nspname = 'pg_catalog'))
> :
Actually, the preferred way to spell that sort of thing is
WHERE
d.classoid = 'pg_catalog.pg_largeobject'::regclass
which is not only shorter but orders of magnitude more efficient.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-09-24 13:51:42 | Re: Configuring synchronous replication |
Previous Message | Magnus Hagander | 2010-09-24 13:23:32 | Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running |