Thread: cannot access or delete view

cannot access or delete view

From
Holger Marzen
Date:
Hi all,

I installed PostgreSQL 7.4.2 from backports.org and all went fine. Then
I did as user postgres:

create view v_laufverke
as
select
   distinct
   bg.mandant as v_mandant,
   bg.benutzer as v_benutzer,
   l.laufwerk as v_laufwerk,
   l.pfad as v_pfad,
   l.benutzer as v_login_benutzer,
   l.kennwort as v_login_kennwort
from
   laufwerk l,
   laufwerk_in_gruppe lg,
   benutzer_in_gruppe bg
where
   l.mandant = lg.mandant and
   l.mandant = bg.mandant and
   l.laufwerk = lg.laufwerk and
   lg.gruppe = bg.gruppe and
   bg.mandant = lower('201') and
   bg.benutzer = lower('Marzen');


But "select * from v_laufwerke" gives "FEHLER:  Relation >>v_laufwerke<<
existiert nicht" (ERROR: Relation v_laufwerke doesn't exist). Dropping
fails as well although it seems to be there:

login=# \dv
            List of relations
  Schema |    Name     | Type |  Owner
--------+-------------+------+----------
  public | v_laufverke | view | postgres
(1 row)

\dv v_laufwerke returns "No matching relations found."  (in english).

Did I miss something?

Re: cannot access or delete view

From
Alvaro Herrera
Date:
On Mon, Jul 12, 2004 at 03:03:14PM +0200, Holger Marzen wrote:

> But "select * from v_laufwerke" gives "FEHLER:  Relation >>v_laufwerke<<
> existiert nicht" (ERROR: Relation v_laufwerke doesn't exist). Dropping
> fails as well although it seems to be there:
>
> login=# \dv
>            List of relations
>  Schema |    Name     | Type |  Owner
> --------+-------------+------+----------
>  public | v_laufverke | view | postgres
> (1 row)

I see a "v" in the name instead of a "w" ?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Porque Kim no hacia nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)