Re: creating a view that shows relation name -> OID - Mailing list pgsql-general

From Bill Huff
Subject Re: creating a view that shows relation name -> OID
Date
Msg-id 20010313120727.A3514@colltech.com
Whole thread Raw
In response to creating a view that shows relation name -> OID  ("Kevin T. Manley" <kmanley@qwest.net>)
List pgsql-general
  The view is trying to make a column called oid which will already exist.

  Change your create to:

    CREATE VIEW VW_FOO AS select pg_class.oid as v_oid, relname from pg_class
    where relowner=27;

--
Bill

On Tue, Mar 13, 2001 at 09:39:23AM -0800, Kevin T. Manley wrote:
> This works:
>
> select pg_class.oid, relname from pg_class where relowner=27;
>
> but this:
>
> CREATE VIEW VW_FOO AS select pg_class.oid, relname from pg_class where
> relowner=27;
>
> fails with:
>
> Attribute 'oid' has a name conflict
> Name matches an existing system attribute
>
> How come?
>
> TIA
> Kevin
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
     _____
    / ___/___       | Bill Huff / bhuff@colltech.com
   / /__  __/       | Voice: (512) 263-0770 x 262
  / /__/ /          | Fax:   (512) 263-8921
  \___/ /ollective  | Pager: 1-800-946-4646 # 1406217
      \/echnologies |------[ http://www.colltech.com ] ------

pgsql-general by date:

Previous
From: "Kevin T. Manley"
Date:
Subject: creating a view that shows relation name -> OID
Next
From: Tom Lane
Date:
Subject: Re: creating a view that shows relation name -> OID