Re: Status of Hierarchical Queries

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Status of Hierarchical Queries
Дата
Msg-id 87d543p6vq.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Status of Hierarchical Queries  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Список pgsql-hackers
"Jonah H. Harris" <jonah.harris@gmail.com> writes:

> As was discussed in several threads, I'd handed over the
> responsibility of hierarchical queries to Greg Stark several weeks
> ago.  He posted a preliminary patch which I don't believe anyone
> looked at.  For 8.3's sake, I wanted to make sure we get the status of
> this out on the table so there won't be any surprises like those
> related to 8.2.
>
> Where are we at?  

The preliminary patch didn't actually do anything recursive. It handled
non-recursive WITH clauses by directly inlining the subquery as if it were a
subquery RangeTable.

Now that's not entirely useless, it's a handy syntactic sugar for having to
write the same query multiple times.

> Has anyone reviewed the preliminary work? Any comments, suggestions, etc?

I had asked questions about whether people thought the places where I was
storing the state were appropriate. I'm not entirely clear on what types of
state should live in the pstate versus in the parse tree versus elsewhere.

Specifically I asked about a problem where I thought using the pstate to store
the scope of the cte names would give the right semantics where they get
inherited by subqueries but pass out of scope for outer queries. However for
some reason I wasn't getting the behaviour I was expecting and subqueries
didn't seem to have them in scope.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Column storage positions
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: bug in CHECK(some SIMILAR TO ..)