From: | Steve Midgley <science(at)misuse(dot)org> |
---|---|
To: | aditya desai <admad123(at)gmail(dot)com> |
Cc: | depesz(at)depesz(dot)com, pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Partition by outer join |
Date: | 2021-08-24 16:01:46 |
Message-ID: | CAJexoSJrP9KTo5Xno1-q+WOpHaO3ArGBkLh5UX7S683y1X83jw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, Aug 23, 2021 at 11:49 PM aditya desai <admad123(at)gmail(dot)com> wrote:
> Agree!! I will try to get data, which looks difficult actually. Thanks for
> your response.
>
> On Tue, Aug 24, 2021 at 12:02 PM hubert depesz lubaczewski <
> depesz(at)depesz(dot)com> wrote:
>
>> On Mon, Aug 23, 2021 at 09:22:47PM +0530, aditya desai wrote:
>> > While trying to migrate Oracle to Postgres wera stuck with PARTITION BY
>> > OUTER JOIN. Can someone help rewriting or helping with Postgres
>> > equivalent of below query? Thanks in advance.
>>
>> It would make MUCH more sense to show us data and expected output.
>> Why do you assume Pg dbas know and understand intricacies of Oracle?
>>
>>
From that stackexchange post, it appears that partition in Oracle is
similar to cross joins in Postgres -- where elements are included in the
result set as a matrix, whether they exist in the source data or not (so
sparsely populated values are included as nulls when they exist in either
of the two columns that are cross joined). So I would start digging on
cross joins.
And if you can produce a data set (ideally with create / insert statements)
that represents your source, and you can produce a desired output, I've
found members of this group pretty quickly produce a solution in Postgres.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-08-24 16:09:26 | Re: Partition by outer join |
Previous Message | David G. Johnston | 2021-08-24 14:15:29 | Re: Partition by outer join |