Re: FROM Clause subquery - Mailing list pgsql-general

From Stephan Szabo
Subject Re: FROM Clause subquery
Date
Msg-id 20020311091522.H45259-100000@megazone23.bigpanda.com
Whole thread Raw
In response to FROM Clause subquery  ("DongSoo Song" <namsanmo@kehc.org>)
List pgsql-general
> Now I want to get sequence fields following:
>
> test=# select * from (select relname from pg_class where relkind='S') as foo;
>
> My Result:
>
>          relname
> -------------------------
>  test_seq
> (1 rows)
>
> Why? FROM Clause subquery not working? or my mistakes?

That's not what the above does.  The subselect in from isn't a substitute
for table names, it's a substitute for a table.  Think of it almost as an
inplace view definition.



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Nice Oracle tuning article
Next
From: Stephan Szabo
Date:
Subject: Re: ERROR: DefineIndex: index function must be marked