Re: an difficult SQL

2022-11-06 Thread Rafal Pietrak
Great, with a little tweaking (to get the remaining rows ordered correctly), this did the job. Thank you Erik. BR -R W dniu 6.11.2022 o 15:23, Erik Wienhold pisze: On 06/11/2022 13:48 CET Rafal Pietrak wrote: W dniu 5.11.2022 o 19:05, Thiemo Kellner pisze: You first could select the

Re: an difficult SQL

2022-11-06 Thread Rafal Pietrak
in the final select. I do not know your background, however, sql is about data sets end it is not always easy to get ones head around thinking in sets. I hope you could follow my suggestions. It might not be the most efficient way but should work. Kind regards Thiemo Am 05.11.22 um 16:10 schr

an difficult SQL

2022-11-05 Thread Rafal Pietrak
Hi Everybody, I was wondering if anybody here could help me cook up a query: 1. against a list of events (like an activity log in the database). The list is a single table: create table events (tm timestamp, user int, description text). 2. of which the output would be sorted in such a way, t

Re: Fwd: row level security (RLS)

2021-03-15 Thread Rafal Pietrak
W dniu 15.03.2021 o 18:01, Laurenz Albe pisze: > On Mon, 2021-03-15 at 16:28 +0100, Rafal Pietrak wrote: >> 5. My experiments with RLS was like following: >> - I've implemented a STABLE function, that returns INTEGER 1/0 >> - I've linked that

Fwd: row level security (RLS)

2021-03-15 Thread Rafal Pietrak
Hello, I was told, that pgsql-hackers is not the right list for the following questions. So I'm reposting to general. Does anybody have an opinion regarding the following questions? --- Hello, Forgive me for probably naive questions, being so talkative like the foll

Re: FK v.s unique indexes

2018-07-05 Thread Rafal Pietrak
W dniu 05.07.2018 o 23:04, David G. Johnston pisze: > On Thu, Jul 5, 2018 at 1:45 PM, Rafal Pietrak <mailto:ra...@ztk-rp.eu>>wrote: > > I was thinking, that when "add constraint" cannot choose appropriate > index, may be some explicit help (like

Re: FK v.s unique indexes

2018-07-05 Thread Rafal Pietrak
W dniu 05.07.2018 o 10:11, Rob Sargent pisze: [---] >> >> Pls consider in real life: load (a person), can have either a (a kind of >> brest cancer); or b (a kind of prostrate) - this is only a cooked >> example attemping to illustrate, that one may need to put additional >> constrain

Re: FK v.s unique indexes

2018-07-05 Thread Rafal Pietrak
W dniu 05.07.2018 o 15:18, David G. Johnston pisze: > On Thursday, July 5, 2018, Rafal Pietrak <mailto:ra...@ztk-rp.eu>> wrote: > > W dniu 04.07.2018 o 00:55, David G. Johnston pisze: > > On Tuesday, July 3, 2018, Rafal Pietrak <mailto:ra...@ztk-rp.eu

Re: FK v.s unique indexes

2018-07-05 Thread Rafal Pietrak
W dniu 03.07.2018 o 11:23, David Rowley pisze: > On 3 July 2018 at 19:30, Rafal Pietrak wrote: [---] >> >> Why is this forbidden? > > I don't think there were any actual roadblocks, it was more of just > not enough time in the cycle to make it work due

Re: FK v.s unique indexes

2018-07-05 Thread Rafal Pietrak
W dniu 04.07.2018 o 00:55, David G. Johnston pisze: > On Tuesday, July 3, 2018, Rafal Pietrak <mailto:ra...@ztk-rp.eu>> wrote: > > > ERROR:  there is no unique constraint matching given keys for referenced > table "test2" > -

FK v.s unique indexes

2018-07-03 Thread Rafal Pietrak
Hi, For some time now, I'm withholding new features in my DB application as I wasn't able to have unique constraints on partitioned tables. PG-v11 now has it and I've given it a try, but to my surprise it does not give it fully to the application. Those indexes don't support FK! At this point I've

Re: unsubscribe

2017-11-21 Thread Rafal Pietrak
r was babysitted for a while. Regards R 21.11.2017 8:19 AM Craig Ringer napisał(a):On 21 November 2017 at 15:17, Rafal Pietrak <rafal@ztk-rp.eu> wrote:Hi all, Have anyone noticed, that last couple of days on the list, can become a nice example of HOWTO turn the best list on the planet into

Re: unsubscribe

2017-11-20 Thread Rafal Pietrak
Hi all, Have anyone noticed, that last couple of days on the list, can become a nice example of HOWTO turn the best list on the planet into a nightmare? Pls forgive rudeness, but IMHO, whoever made the "upgrade" should manually take all the "unsubscribe" messages from archive and do that "unsubsc