Re: nextval per counted
От | David G. Johnston |
---|---|
Тема | Re: nextval per counted |
Дата | |
Msg-id | CAKFQuwaUV3L95TzJL8rtsvcNg24ZOayMOezFJME5Gdygfxi5Zg@mail.gmail.com обсуждение исходный текст |
Ответ на | nextval per counted (Rob Sargent <robjsargent@gmail.com>) |
Ответы |
Re: nextval per counted
|
Список | pgsql-general |
On Fri, Jan 27, 2023 at 1:59 PM Rob Sargent <robjsargent@gmail.com> wrote:
I'm trying to craft SQL to invoke a sequence nextval once per grouped value.
This seems like a very unusual usage of nextval/sequences...
with cleanup as (
), compute as (
select ma, pa, nextval(...) from cleanup
)
select * from compute ... -- do whatever else you want
Your "order by mates" in the CTE is totally pointless and wasting resources.
David J.
В списке pgsql-general по дате отправления: