pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
TPCH questions
3+ messages / 3 participants
[nested] [flat]

* TPCH questions
@ 2001-02-15 08:48  Victor Muntes Mutero <vmuntes@ac.upc.es>
  0 siblings, 2 replies; 3+ messages in thread

From: Victor Muntes Mutero @ 2001-02-15 08:48 UTC (permalink / raw)
  To: pgsql-sql; +Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org

Hello,

we have got a problem when executing some queries of tpch benchmark on
PostgreSQL.

For instance, the postgres parser do not accept the syntax of the query
number 9:


select  nation2 , o_year, sum(amount) as sum_profit
from
        (
                select
                        n_name as nation2,
                        extract(year from o_orderdate) as o_year,
                        l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as
amount
                from
                        part,
                        supplier,
                        lineitem,
                        partsupp,
                        orders,
                        nation
                where
                        s_suppkey = l_suppkey
                        and ps_suppkey = l_suppkey
                        and ps_partkey = l_partkey
                        and p_partkey = l_partkey
                        and o_orderkey = l_orderkey
                        and s_nationkey = n_nationkey
                        and p_name like '%green%'
        ) as profit
group by
        nation2,
        o_year
order by
        nation2,
        o_year desc;


Postgres returns the following message: 

ERROR:  parser: parse error at or near "select"


We have tried to solve the problem and we have seen that simplifying,
the real problem shows up when trying to solve a query like this one:

select * from (select * from supplier); (for example)


What's the problem? 

We've heard about some variants of TPCH queries, do you know if there is
any of these which could solve our problem?

Thanks in advance,

Victor Muntes
Pep Aguilar



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

* Re: TPCH questions
@ 2001-02-15 15:15  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Victor Muntes Mutero <vmuntes@ac.upc.es>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2001-02-15 15:15 UTC (permalink / raw)
  To: Victor Muntes Mutero <vmuntes@ac.upc.es>; +Cc: pgsql-sql; pgsql-general@postgresql.org; pgsql-admin@postgresql.org

Victor Muntes Mutero <vmuntes@ac.upc.es> writes:
> we have got a problem when executing some queries of tpch benchmark on
> PostgreSQL.
> For instance, the postgres parser do not accept the syntax of the query
> number 9:

Subselects in FROM are supported as of 7.1, but not in prior releases.

			regards, tom lane



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

* Re: [ADMIN] TPCH questions
@ 2001-02-15 17:48  Peter Eisentraut <peter_e@gmx.net>
  parent: Victor Muntes Mutero <vmuntes@ac.upc.es>
  1 sibling, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2001-02-15 17:48 UTC (permalink / raw)
  To: Victor Muntes Mutero <vmuntes@ac.upc.es>; +Cc: pgsql-sql

Victor Muntes Mutero writes:

> select * from (select * from supplier); (for example)

No subselects in FROM before 7.1.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/




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


end of thread, other threads:[~2001-02-15 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-15 08:48 TPCH questions Victor Muntes Mutero <vmuntes@ac.upc.es>
2001-02-15 15:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-02-15 17:48 ` Peter Eisentraut <peter_e@gmx.net>

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