« first day (4285 days earlier)      last day (573 days later) » 

1:53 AM
@ErikDarling yeah that's what I use
 
 
1 hour later…
3:13 AM
@PaulWhite worst possible option don’t listen to that idiot
 
 
4 hours later…
6:45 AM
morning
 
A chairde - Morning all!
So, any features of PG that you hate? Chatting on bus at the minute!
 
6:58 AM
Morning
 
 
1 hour later…
8:11 AM
@Vérace There are possibly features that I/we don't use, but that isn't the equivalent of "hate". So, no.
 
8:23 AM
@JohnK.N. Fair enough - maybe "hate" was too strong a word - any pet peeves?
 
 
2 hours later…
10:25 AM
Morning
 
10:52 AM
I believe that MERGE does not use a U-lock in the read phase, whereas UPDATE does, so there is that difference also. — Charlieface 17 mins ago
 
@Charlieface are you around?
 
@Charlieface What makes you say that? It absolutely does. Perhaps you misread learn.microsoft.com/en-us/archive/blogs/dbrowne/… when it talks about taking the insert path?
There's nothing to take a U lock on when the WHEN NOT MATCHED clause applies
The page above still gets an IU of course.
 
11:08 AM
It's quite easy to test?
 
11:24 AM
@PaulWhite How do you test the read phase specifically?
@PaulWhite That paper implies you get a IU lock, and mentions upgrading that to a U lock, so maybe I misunderstood what it was talking about.
@ypercubeᵀᴹ Yes, when I'm in the mood. Been very busy the last few days but you can always ping me and I'll see it at some point.
 
no worries. I made a comment and then realized I should just edit.
 
Sep 20 at 12:08, by Charlieface
Some people get so protective of their posts that others get wary. I can never see the problem of reasonable additions/modifications to a post, and I'm happy for anyone to edit mine.
No probs, looks fine to me.
Just delete the comment
 
@Charlieface Just do a regular merge and trace the locks acquired and released. You'll see U acquired on read, conversion to X on change
@Charlieface Yes it only looks at the insert path in detail because it's about the pk violation scenario
@Charlieface Or hold shared locks in a separate session and wait for the merge to block on conversion from U to X
like that ^
@ypercubeᵀᴹ and the angels all sang Hallelujah
👼🎵👼
 
11:54 AM
@PaulWhite Time to read up on XEvents lock tracing
 
It's not as much fun as you might hope
Depending on your expectations, I guess
Is anyone around who understood the 2600 reference earlier able to explain it to me?
16 hours ago, by Sean Gallardy - Mostly Retired
2600
 
@PaulWhite I guess this one
2600: The Hacker Quarterly is an American seasonal publication of technical information and articles, many of which are written and submitted by the readership, on a variety of subjects including hacking, telephone switching systems, Internet protocols and services, as well as general news concerning the computer "underground." With origins in the phone phreaking community and late 20th-century counterculture, 2600 and its associated conference transitioned to coverage of modern hacker culture, and the magazine has become a platform for speaking out against increased digital surveillance and advocacy...
which took its name from
2600 hertz (2600 Hz) is a frequency in hertz (cycles per second) that was used by AT&T as a steady signal to mark currently unused long-distance telephone lines. During the 1960s, in-band signaling was used, so the same line for both voice conversations and telephone connection management signals. Since a pause in a voice conversation would produce silence, another method was required for switches to determine whether a line was in use. The solution AT&T created was to produce a 2600 Hz tone on idle trunks. == In phreaking == In phreaking, a device known as a blue box was used to generate the 2600...
 
@ypercubeᵀᴹ Ah! TYVM
I was aware of phreaking but for some reason did not commit the exact frequency to memory
 
12:11 PM
@PaulWhite hey sorry again maybe just my brain waking up, but "only applies when you logically need to lock one or more rows that don't exist" sounds like an impossible scenario?...I'm sure I'm missing something, but how would one lock a row that doesn't exist?
 
@J.D. Using a key range lock. You lock the range the key would go in, if it existed
Like if I lock the range [1...3] I know no one can insert row 2
Every insert takes a brief insert-null lock to test the range for concurrent serializable transactions
 
Gotcha, thanks! 👍
 
Cool cheers! 🙂
 
Kalen Delaney had a good worked example as well, but I can't find it rn
Probably a Microsoft link that went to the usual resting place
 
12:27 PM
R.I.P Microsoft's last 3 feedback websites.
 
yesterday, by Zikato
user image
 
😁
 
Honestly, they're an internet menace
 
Microsoft the rebranding mad lad
 
 
2 hours later…
2:00 PM
Postgres 15 RC1 is out tomorrow. GA in 2 weeks
2
 
2:25 PM
@J.D. was there something else before Books Online?
anyone knows?
 
I think it was "offline" help docs that were included with the installation media.
I sort of remember Paul or someone posting a screenshot in here a while back.
Although J.D. was talking about feedback sites (UserVoice, etc.), not documentation sites.
 
3:17 PM
@SeanGallardy-MostlyRetired what about the hurricane?
 
shouldn't be a direct hit, lost power and internet a few times
The bay is drained, which means it'll come back higher with surge
1 mph away from cat 5
 
My Dad and uncle are in Leesburg right now.
 
They should be good
 
I was going to ask. Looks like it's on the outer edge of the path on that site you linked to, but I don't really know how to gauge the risk / danger level there.
When I talked to them yesterday, they seemed like they weren't too worried.
 
3:33 PM
I'm not sure if it's going to ride the coast up or cut across the state. Models say it'll cut across the state, which where they are will get some tropical storm winds and rain which isn't much for FL.
Yeah they should be pretty good where they are
 
What would be the plan if you were in the way? Just pack your stuff and leave?
 
If it was a cat 3 or lower I wouldn't go anywhere, just make food and stuff to get me through a week or two of no power. Cat 4 or 5, I'd most likely leave.
The last kind of bad one I just stayed, I only lost power for a day
It's Florida, you get used to it
 
how frequent is it?
 
3:51 PM
every year ;)
 
Between July and November every year :)
 
4:47 PM
Before I ask a question on main, I'd like to ask for some feedback about whether there is a name for this kind of problem. I have a table of work log entries (which have a start time and duration). What I'm trying to do is split a particular day up into 30 minute intervals, and then spread the work log entries across those intervals. This is essentially a report to see how many minutes of work was done during each interval.
I wrote a query that does this, but it seems terrible and overcomplicated, and I'm leaning heavily towards calculating the intervals in C# instead.
But I thought I'd ask in here if this is some common class of problem that has neater solutions.
This is a fiddle of the approach I was going with so far: dbfiddle.uk/l0vvJI41
 
5:19 PM
So it's how much of the interval belongs in a 30 min date bucket? Reminds me a bit of sqlperformance.com/2021/12/t-sql-queries/…
 
@SeanGallardy-MostlyRetired Good 'ol storm season. It's what keeps me employed lol. But yea pushing a cat 5 down there this time, good luck. I heard 300,000 outages so far.
 
5:36 PM
@JoshDarnell I’ve heard it called a punch card or time clock problem before (assuming I have the right mental picture of the problem you’re trying to solve).
Answer quality will depend on all sorts of weird things like passing midnight, time zones, weekend shifts, etc.
 
@JoshDarnell I don't know if there's a name for this type of query but that CASE looks very complicated. It could probably be simplified. A lot of duplication.
 
Well when @ypercubeᵀᴹ says something is complicated…
 
@ErikDarling Yes, I think you've got the right mental picture based on that.
@ypercubeᵀᴹ Haha yeah, that's what made me think I was going down the wrong road.
 
 
1 hour later…
6:42 PM
I've never been good at reducing duplication in CASE statements. My thinking is too iterative probably.
 
@JoshDarnell I'll try it in a bit
 
6:58 PM
Thanks!
Maybe I'll go ahead and post on main, so we're not doing all of this in chat.
Although it's tough to define what I'm looking for beyond "less complicated."
 
7:23 PM
@JoshDarnell dbfiddle.uk/y7wDo4po
And another one, which I am not sure if I like, as it has OUTER APPLY inside OUTER APPLY. But only a single use on Intervals: dbfiddle.uk/rXD80wGc
 
I'm in meetings now but will check those out in a minute
 
7:47 PM
@ypercubeᵀᴹ Amazing! The greatest and least thing is such a great simplification. And applying in the different calculated values one at a time makes the whole query a lot easier to read.
(to me)
(4 me)
 
8:11 PM
I hear GREATEST() and LEAST() are already in Azure and will be on 2022 version. Not sure what types they will cover though.
oh, any comparable type. good
> A list of comma-separated expressions of any comparable data type. The GREATEST function requires at least one argument and supports no more than 254 arguments.
 
 
2 hours later…
9:50 PM
@JoshDarnell Have you tried thinking in sets
 
10:04 PM
@ypercubeᵀᴹ SQL Server 6.5 was my first. It had "Books Online" but it was a local Windows help file. CHM format I think.
Sep 11, 2013 at 20:16, by swasheck
i always thought that the SQL 2000 BOL was funny because i'd only ever used it as an offline .CHM
Perhaps "online" meant not in a physical manual/book at the time, rather than hosted on the web
 
 
1 hour later…
11:13 PM
@PaulWhite yeah, I remember the same for Access
 

« first day (4285 days earlier)      last day (573 days later) »