From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: obj_description problems? |
Date: | 2003-10-21 05:42:16 |
Message-ID: | 3F94C738.8000804@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Ooer - it is a nasty bug. From pg_proc.h, the definition of
obj_description is:
select description from pg_description where objoid = $1 and classoid =
(select oid from pg_class where relname = $2 and relnamespace = PGNSP)
and objsubid = 0
And what's more, none of the SQL functions in pg_proc.h are properly
qualified. I have attached a patch that may or may not be the solution
- please check.
I didn't know how to handle 'timestamp without time zone' types and
'overlaps'.
I realise now that there's no need to schema-qualify names - you can
only do names from pg_catalog.
Chris
Christopher Kings-Lynne wrote:
> How do I use a schema-qualified name in obj_description? Or is this a
> nsty little bug?
>
> Chris
>
> test2=# create schema myschema;
> CREATE SCHEMA
> test2=# create table myschema.pg_class (a int4);
> CREATE TABLE
> test2=# select oid from pg_catalog.pg_class where
> oid='myschema.pg_class'::regclass;
> oid
> ---------
> 1475161
> (1 row)
>
> test2=# select obj_description('1475161', 'pg_class');
> obj_description
> -----------------
>
> (1 row)
>
> test2=# select obj_description('1475161', 'pg_catalog.pg_class');
> obj_description
> -----------------
>
> (1 row)
>
> test2=# set search_path to myschema, pg_catalog;
> SET
> test2=# select obj_description('1475161', 'pg_class');
> ERROR: Attribute "relname" not found
> test2=# select obj_description('1475161', 'pg_catalog.pg_class');
> ERROR: Attribute "relname" not found
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
Attachment | Content-Type | Size |
---|---|---|
pg_proc.txt | text/plain | 17.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-10-21 05:51:28 | Re: [HACKERS] obj_description problems? |
Previous Message | Christopher Kings-Lynne | 2003-10-21 05:20:57 | obj_description problems? |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-10-21 05:44:55 | [Fwd: Re: [HACKERS] obj_description problems?] |
Previous Message | Christopher Kings-Lynne | 2003-10-21 05:20:57 | obj_description problems? |