pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unable to read from a view
5+ messages / 2 participants
[nested] [flat]

* Unable to read from a view
@ 1999-02-24 19:36 Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-24 22:01 ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Gregory Holston @ 1999-02-24 19:36 UTC (permalink / raw)
  To: pgsql-sql@hub.org


Hi all,

I just created a view and have been unable to read from it.  I am 
Apache/1.3.1 (Unix) PHP/3.0.3 and Postgres 6.4.  When I tried to do a 
select it gives the following error message:

real=> select * from pubsearch;
ERROR:  nodeRead: Bad type 0

I created the view with the following select statment:

select distinct users.firstname, users.lastname, publication.title, 
publication.publisher, publication.year from
publication, authors, users
where users.id = authors.id and authors.pubrelease = 
publication.pubrelease;

firstname is type text
lastname is type text
title is type text
year is type text

Thanks in advance for all your help,

-Greg



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] Unable to read from a view
  1999-02-24 19:36 Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
@ 1999-02-24 22:01 ` Jan Wieck <jwieck@debis.com>
  1999-02-24 22:03   ` Re: [SQL] Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  0 siblings, 1 reply; 5+ messages in thread

From: jwieck@debis.com @ 1999-02-24 22:01 UTC (permalink / raw)
  To: holston@itd.nrl.navy.mil; +Cc: pgsql-sql@hub.org

> 
> 
> Hi all,
> 
> I just created a view and have been unable to read from it.  I am 
> Apache/1.3.1 (Unix) PHP/3.0.3 and Postgres 6.4.  When I tried to do a 
> select it gives the following error message:
> 
> real=> select * from pubsearch;
> ERROR:  nodeRead: Bad type 0
> 
> I created the view with the following select statment:
> 
> select distinct users.firstname, users.lastname, publication.title, 
         ^^^^^^^^
     
    DISTINCT isn't supported in view definitions. You can SELECT
	from view's distinct, but you cannot define them to be.  Nor
	could you define views with group by and order by.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] Unable to read from a view
  1999-02-24 19:36 Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-24 22:01 ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
@ 1999-02-24 22:03   ` Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-25 09:03     ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Gregory Holston @ 1999-02-24 22:03 UTC (permalink / raw)
  To: Jan Wieck <jwieck@debis.com>; +Cc: pgsql-sql@hub.org



On Wed, 24 Feb 1999, Jan Wieck wrote:

> > 
> > 
> > Hi all,
> > 
> > I just created a view and have been unable to read from it.  I am 
> > Apache/1.3.1 (Unix) PHP/3.0.3 and Postgres 6.4.  When I tried to do a 
> > select it gives the following error message:
> > 
> > real=> select * from pubsearch;
> > ERROR:  nodeRead: Bad type 0
> > 
> > I created the view with the following select statment:
> > 
> > select distinct users.firstname, users.lastname, publication.title, 
>          ^^^^^^^^
>      
>     DISTINCT isn't supported in view definitions. You can SELECT
> 	from view's distinct, but you cannot define them to be.  Nor
> 	could you define views with group by and order by.

I have tried to drop the view and it gives the same error message.  Is 
there any way to get rid of them (2).

Thanks for the help,

-Greg



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] Unable to read from a view
  1999-02-24 19:36 Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-24 22:01 ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
  1999-02-24 22:03   ` Re: [SQL] Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
@ 1999-02-25 09:03     ` Jan Wieck <jwieck@debis.com>
  1999-02-25 15:21       ` Re: [SQL] Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  0 siblings, 1 reply; 5+ messages in thread

From: jwieck@debis.com @ 1999-02-25 09:03 UTC (permalink / raw)
  To: holston@itd.nrl.navy.mil; +Cc: jwieck@debis.com; pgsql-sql@hub.org

>
>
>
> On Wed, 24 Feb 1999, Jan Wieck wrote:
>
> > >
> > >
> > > Hi all,
> > >
> > > I just created a view and have been unable to read from it.  I am
> > > Apache/1.3.1 (Unix) PHP/3.0.3 and Postgres 6.4.  When I tried to do a
> > > select it gives the following error message:
> > >
> > > real=> select * from pubsearch;
> > > ERROR:  nodeRead: Bad type 0
> > >
> > > I created the view with the following select statment:
> > >
> > > select distinct users.firstname, users.lastname, publication.title,
> >          ^^^^^^^^
> >
> >     DISTINCT isn't supported in view definitions. You can SELECT
> >  from view's distinct, but you cannot define them to be.  Nor
> >  could you define views with group by and order by.
>
> I have tried to drop the view and it gives the same error message.  Is
> there any way to get rid of them (2).

    Don't  know if it really works for you (I can't reproduce the
    problem shortly), but try this as postgres superuser:

        DELETE FROM pg_rewrite WHERE rulename = '_RETpubsearch';
        DROP TABLE pubsearch;


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] Unable to read from a view
  1999-02-24 19:36 Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-24 22:01 ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
  1999-02-24 22:03   ` Re: [SQL] Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
  1999-02-25 09:03     ` Re: [SQL] Unable to read from a view Jan Wieck <jwieck@debis.com>
@ 1999-02-25 15:21       ` Gregory Holston <holston@itd.nrl.navy.mil>
  0 siblings, 0 replies; 5+ messages in thread

From: Gregory Holston @ 1999-02-25 15:21 UTC (permalink / raw)
  To: Jan Wieck <jwieck@debis.com>; +Cc: jwieck@debis.com; pgsql-sql@hub.org

> 
>     Don't  know if it really works for you (I can't reproduce the
>     problem shortly), but try this as postgres superuser:
> 
>         DELETE FROM pg_rewrite WHERE rulename = '_RETpubsearch';
>         DROP TABLE pubsearch;

It worked thanks a lot!!!

-Greg



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1999-02-25 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-02-24 19:36 Unable to read from a view Gregory Holston <holston@itd.nrl.navy.mil>
1999-02-24 22:01 ` Jan Wieck <jwieck@debis.com>
1999-02-24 22:03   ` Gregory Holston <holston@itd.nrl.navy.mil>
1999-02-25 09:03     ` Jan Wieck <jwieck@debis.com>
1999-02-25 15:21       ` Gregory Holston <holston@itd.nrl.navy.mil>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox