TPCH questions - Mailing list pgsql-general

From Victor Muntes Mutero
Subject TPCH questions
Date
Msg-id 3A8B97D1.41C6@ac.upc.es
Whole thread Raw
Responses what means "INSERT xxx yyy" ?  (Jean-Arthur Silve <jeanarthur@eurovox.fr>)
Re: [ADMIN] TPCH questions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Re: tmp_pg_shadow
Next
From: Jean-Arthur Silve
Date:
Subject: what means "INSERT xxx yyy" ?