« first day (2191 days earlier)      last day (2681 days later) » 

12:09 AM
 
 
2 hours later…
2:18 AM
Oh hellz yeah, I'll take pride in that hat.
Just got Maverick
 
 
5 hours later…
7:41 AM
@EvanCarroll Is there any practical use for a table with no columns? (cc: @TypoCubeᵀᴹ)? Not sure if/when this feature would ever come in handy?
 
8:30 AM
@MartinSmith for one, it is not SQL standard. SQL tables should have 1+ columns.
I'd say it's useful for completeness. I don't see any reason for the 1+ rule.
Second, if we allow 0-column tables, then we don't need any special dual table.
In Tutorial D I think, there are 2 special tables DEE and DUM. Both with 0-columns, 1 and 0 rows respectively.
so EXISTS (SELECT * FROM DEE) is a "shortcut" to TRUE. (and for DUM to FALSE)
Whether you consider these useful or not, ...
@MartinSmith a case where having 0-columns in the PK constraint would be useful (but obviously more than 0 in the table):
18
Q: How to limit maximum number of rows in a table to just 1

DibI have a configuration table in my SQL Server database and this table should only ever have one row. To help future developers understand this I'd like to prevent more than one row of data being added. I have opted to use a trigger for this, as below... ALTER TRIGGER OnlyOneConfigRow ON [dbo...

 
@MartinSmith I use the DUAL table in Oracle all the time, but never use the single DUMMY column it contains — it's only there because there has to be a column I guess.
 
The specific RDBMS in question that supports columnless tables doesn't require a dummy table, though, because it also supports FROM-less SELECTs. And it has the boolean data type, so TRUE and FALSE don't need shortcuts in Postgres.
So the question about practical usefulness still remains (for me anyway)
 
8:48 AM
@AndriyM I said "shortcut"
 
@TypoCubeᵀᴹ Shortcuts or "shortcuts" – I still don't see the practical usefulness.
Perhaps you could use them do duplicate rows if you also wanted to use SELECT *, as in SELECT * FROM MyTable CROSS JOIN NRowColumnlessTable;, where NRowColumnlessTable would contain the required number of rows.
 
@AndriyM Lets say we want to find if there are Heap users from Belgium. What query we run?
 
@MartinSmith Oracle uses DUAL (which has one row) for just selecting a single row, as you still need to select from something. Whereas, in T-SQL you can just select random junk without having to specify a source.
 
SELECT EXISTS (SELECT * FROM Heap WHERE country = 'Belgium');
or something lik ethat, right?
 
I guess so
 
8:56 AM
SELECT FROM Heap WHERE country = 'Belgium' ;
We get as a result a 0-column table, with either 0 or 1 row.
If you think about it, there is no more info that a 0-column table can give. Only 1 bit of information.
(I assume we don't allow more than 1 rows)
(and sorry, should be SELECT DISTINCT FROM ..)
 
That may be showing usefulness of a columnless result set rather than a columnless source row set, as I took Martin's question to be about. (And anyway that's what I'm interested in.)
Nice example, though.
 
@AndriyM yes, my point is that it may be useful as an intermediate or final result as well.
 
Happy New Year to everybody.
 
9:26 AM
heh, 1595 unread posts
and, apparently, some were not even worth reading
that's a sort of a happy new year
I wish a better one to all!
 
 
2 hours later…
11:11 AM
morning
 
 
2 hours later…
12:47 PM
@AndriyM and restricting this only to intermediate or final results but forbidding it for base tables seems arbitrary. And needs special care in implementation, for example in CREATE TABLE AS SELECT ... (I think that was one of the reasons that Postgres devs allowed 0-column tables in the first place).
 
@TypoCubeᵀᴹ Yes, after your example it occurred to me that the main point might have been to allow 0-column sets in output, and allowing them in base tables might have happened because it was easier to implement the feature that way.
Or more sensible (doesn't matter much)
 
@AndriyM we'll have to look up into the actual discussion in postgres-hackers to be sure.
 
@TypoCubeᵀᴹ Which I'm perfectly fine about giving a miss to at this point :)
 
1:40 PM
@AndriyM having a theoretical background, I often neglect this aspect.
Practical uses is the least of my considerations, when there is a theoretical improvement ;)
A Mathematician's Apology is a 1940 essay by British mathematician G. H. Hardy. It concerns the aesthetics of mathematics with some personal content, and gives the layman an insight into the mind of a working mathematician. == Summary == In the book's title, Hardy uses the word "apology" in the sense of a formal justification or defence (as in Plato's Apology of Socrates), not in the sense of a plea for forgiveness. Hardy felt the need to justify his life's work in mathematics at this time mainly for two reasons. Firstly, at age 62, Hardy felt the approach of old age (he had survived a h...
 
2:19 PM
Stonkin hat, @TypoCubeᵀᴹ !
@ConcernedOfTunbridgeWells I love that it's named DUAL, but only contains one row.
 
@MaxVernon I think it originally had 2 rows.
in some ancient version. Jack and Phil would know.
 
@TypoCubeᵀᴹ - one that had "YES" and one that had "NO" in the single column BOOL ? :-)
 
no idea
 
@TypoCubeᵀᴹ you've just made me change my mind on Evan's question about how to create a row number without using ROW_NUMBER().
 
@TypoCubeᵀᴹ are you calling them "ancients"?
 
2:25 PM
@MaxVernon ha ;)
@Lamak in the American meaning of the word "ancient". You know, anything from the previous century
 
I mean, it's technically speaking not "applied SQL" if it isn't actually applied to anything "real".
@TypoCubeᵀᴹ "stuff from before" I prefer to call it. ;-)
 
> Charles Weiss explains why he created DUAL:

I created the DUAL table as an underlying object in the Oracle Data Dictionary. It was never meant to be seen itself, but instead used inside a view that was expected to be queried. The idea was that you could do a JOIN to the DUAL table and create two rows in the result for every one row in your table. Then, by using GROUP BY, the resulting join could be summarized to show the amount of storage for the DATA extent and for the INDEX extent(s). The name, DUAL, seemed apt for the process of creating a pair of rows from just one.[1]
from
The DUAL table is a special one-row, one-column table present by default in Oracle and other database installations. In Oracle, the table has a single VARCHAR2(1) column called DUMMY that has a value of 'X'. It is suitable for use in selecting a pseudo column such as SYSDATE or USER. == Example use == Oracle's SQL syntax requires the FROM clause but some queries don't require any tables - DUAL can be readily used in these cases. == History == Charles Weiss explains why he created DUAL: I created the DUAL table as an underlying object in the Oracle Data Dictionary. It was never meant to be seen...
 
@TypoCubeᵀᴹ I'm tempted to vote to reopen it so I can add an answer that shows how it would work in T-SQL, but I'm not sure that would actually help in the larger sense of the word since his question is about PostgreSQL.
@TypoCubeᵀᴹ swweeeeettttt. thanks for explanation!
 
I thought it wasn't tagged with a dbms but I might be mistaken
 
@TypoCubeᵀᴹ yah, I thought it wasn't either, however I just looked and it's
 
2:30 PM
When I'm reading you folks, I feel like in another dimension where semi-gods speak cryptic but wise language where my understanding is not that great
 
@AndyK lol. thanks?!
 
@MaxVernon stop being cryptic please ;)
 
@AndyK thank you - for the "semi-gods"
 
@TypoCubeᵀᴹ much better than demi, me thinks.
 
@MaxVernon yeah. Demi reminds me of Moore. Surely a goddess but a different kind.
 
2:33 PM
@TypoCubeᵀᴹ most certainly!
 
@MaxVernon yes, right. I confused it with the other q, about select count(*).
 
ah well. lol @MaxVernon
 
@TypoCubeᵀᴹ I could be wrong, but it looks like both answers are far less inefficient than a simple row_number() would be. I mean, a cartesion join? COUNT(*) on an ever-increasing subset of rows? Maybe I misunderstand. And perhaps, I should just stop giving it thought.
 
Maybe.
 
@PaulWhite lol.
on a more upbeat note, I thought @AaronBertrand's blog post about @AMTwo was really great!
 
2:49 PM
morning heapers
 
morning @bluefeet
 
happy new year blue
has the hat fever gone?
 
Hat fever still going
I'm counting down the days though
 
@bluefeet how much longer until "we now return to normal programming" ?
and happy new year!
 
Hats go back in their boxes on the 8th
 
2:56 PM
@bluefeet you should use @PaulWhite's time, it's already january 6th over there
3
 
3:32 PM
Morning all
 
Morning
 
3:51 PM
Morning
 
What no hat for dropping a Harry Potter reference in an SO answer? This is an outrage.
2
0
A: Error while running U-SQL Activity in Pipeline in Azure Data Factory

wBobYour script is missing the scriptLinkedService attribute. You also (currently) need to place the U-SQL script in Azure Blob Storage to run it successfully. Therefore you also need an AzureStorage Linked Service, for example: { "name": "StorageLinkedService", "properties": { "de...

 
@wBob have a plus one for your effort!
 
@MaxVernon Thanks! Accio SearchLogProcessing.txt !
 
Nerd!
 
@PaulWhite lol
That particular ADF walkthru sucks though. Talk about barrier to entry.
 
3:57 PM
@wBob the sorting hat: "@wBob belongs to SO!"
 
@Lamak heh heh SO feels like Slytherin.
2
 
4:08 PM
IT IS I, EVAN THE MAVERICK.
 
4:27 PM
@EvanCarroll Congrats. That's a nice hat, and tough to earn here.
I see @MartinSmith is sporting it as well.
 
You're beating me by one hat Paul =(
 
@PaulWhite True. and the Lifesaver. Hass anyone on dba.se got that one?
 
@EvanCarroll I think the only ones I have that you don't are ones I don't understand how to get so I can't help you there.
@TypoCubeᵀᴹ @bluefeet would know. I haven't seen anyone on dba with it. Lots of luck needed.
 
Anyone read the PostGIS book
It's fantastic.
 
We don't get many decent Tumbleweed questions.
Which sort of makes sense actually.
Not for the popular products anyway.
 
4:32 PM
Can we even query for questions that would earn the hat?
 
@EvanCarroll You can click on the Tumbleweed badge to see which questions it was awarded for.
 
How do you find the badge page on SE?
I hate the UI on badges. It's so counter intuitive.
I got the bronze badge for postgresql, I couldn't find out how many got the silver badge because I didn't know where to look to find it.
You think you'd see some indicator on the top, or sidebar for gold and silver tag badges.
On so there is a badges page with all of them, and you go out to that. dba.stackexchange.com/help/badges
 
8 people have the silver postgresql badge.
 
4:36 PM
@PaulWhite I could do that. Would you like me to?
 
They should get a special hat.
 
@PaulVargas lol that's why you need PMs!
 
@bluefeet Yes please!
@TypoCubeᵀᴹ I thought you had gold postgresql?
 
bye folks
 
@PaulVargas Nice!
Hm 13 gold sql-server badges.
5 for mysql, 4 for pg, 1 for oracle.
 
4:42 PM
The linux Compose file is so awkward.
It has an entry for <Multi_key> <F> <U> : "🖕" U1F595 # REVERSED HAND WITH MIDDLE FINGER EXTENDED
But, it does not have an entry for UTF8 checkbox.
check/x
one of my more useful contributions to Debian.
 
5:02 PM
@PaulWhite Not yet. Need about 200 rep for that.
 
@TypoCubeᵀᴹ Ah OK.
 
@PaulWhite one person has it on DBA
 
@TypoCubeᵀᴹ ^^^
@bluefeet Thanks!
One person with the Lifesaver hat. One!
 
5:19 PM
the only way to learn to swim is to risk drowning
 
6:11 PM
@PaulWhite I had a chance at the bizarre-Update bounty q
 
@AaronBertrand - my apologies if my edit is annoying. Feel free to roll it back if necessary!
 
It's a win-win. Either a bounty or a hat ;) Not sure which I prefer more. And the other answers explain what happened more or less. Bruno had some wrong calcs if I read it right. (n^2*m vs n*m^2)
 
@TypoCubeᵀᴹ One thing that would add value to would to mention that PG creates a new "row version" (or whatever you call it) for multiple updates to the same row by the same transaction. If that is correct.
It may be implicit in the other answers.
And I think we both know you'd prefer the hat :)
 
@PaulWhite yes
 
6:24 PM
there should be a "this is fine" hat
 
@Lamak There is. It's a secret hat.
 
there should be a "I don't know what I'm talking about" hat
4
 
@Lamak could they call it the Camel hat?
slightly cryptic but enough of us would know what it was about.
 
Camel hat?
 
Lamak is Kamal backwards, right? Camel is a play on that?
so much funnier now.
2
 
6:29 PM
@MaxVernon right, it is
 
no offence, by the way @Lamak!
 
Hardly at great length, but we'll take what we can get.
 
true dat
 
@MaxVernon non taken at all
 
great
I may be eating the hottest curry ever made right now. And I like my curry hot!
 
6:32 PM
> The CREATE NONCLUSTERED INDEX statement may fail if the database name begins with a '#' character.
Who would do that?
 
@PaulWhite one of the "camel hat" owners
 
Raspberry Pi gets HW-accelerated HEVC decoding through 500 line patch...
 
Ha yeah maybe trying to create a 'temporary' database.
 
@PaulWhite temporary databases. people may want to mimic a mongodb functionality
or maybe they're just trying to tweet their database names
 
CREATE DATABASE #YOLO
4
 
6:42 PM
I found my 2017 challenge
Learn how to do that ^^
 
@TomV Most impressive
 
@MaxVernon Not at all, I started to look it up and then I didn't have to. Thanks!
 
@AaronBertrand my pleasure
 
@AndriyM I'm sure he gets all the ladies
 
@EvanCarroll HEVC ?
 
6:49 PM
Um, be appropriate @EvanCarroll
 
:34527074 I've heard of h.265, just not HEVC.
 
Ninja'd by a blue foot
 
@PaulWhite - PIVOTd into oblivion.
I'd make this into an answer, but I'm unsure how to expound upon it. Also, I'm probably wrong:
You may want to prevent references to critical tables where a reference might degrade performance. — Max Vernon 38 mins ago
 
Nooooooooo
I prefer this video
Removed because @PaulWhite is no fun. :P
 
6:56 PM
For those wondering for the relevance of the video I linked
@Zimmerel Sounds like a doorhouse. I have a house, and you use a door to get in. So, doorhouse! — Aaron Bertrand ♦ 35 mins ago
I have a door, I have a house. I have a doorhouse!
 
my god ... it's full of spam
3
 
@bluefeet haha
 
I have a pen, I have pineapple, pineapple pen.
 
@swasheck hush
 
I looked away for a moment and The Heap turned into Facebook
5
 
7:00 PM
i blame @Lamak
 
Here’s a new one: SELECT … FROM VWTBL_Something. What on earth is a view table?
I knew I'd seen that doorhouse before.
@bluefeet I hate fun, even in moderation.
(see what I did there)
 
@PaulWhite ;)
 
@PaulWhite No
 
Honestly if I had a dollar for every cat video on FB my wife forced me to watch promising "this one is different, it's really funny, you'll like it!"
 
@TomV I wasn't doing anything
 
7:06 PM
@PaulWhite Still needs more explaining
 
@TomV I will explain at torturous length in due course.
 
@PaulWhite I don't like this new trend of humour
 
@PaulWhite AMEN BROTHER!
except with us it's dog videos
 
@MaxVernon Grounds for divorce am I right
 
for certain!
 
7:08 PM
Ok out of here for a few hours. Have fun.
 
@PaulWhite slacker
 
Doink
 
7:47 PM
@PaulWhite The one drawback of Face Book Purity is that it can not yet identify cats.
 
@PaulWhite I'm sporting it on this site but it wasn't earned here! There was a powershell question on StackOverflow that ended up going from -3 to +3 due to the meta effect.
 
@MartinSmith pretty spiffy
 
I am the one true maverick.
 
@MartinSmith aha
 
I thought you were gone for a few hours
time sure pass differently in NZ
 
7:53 PM
Doinks
 
Me?!? Nah, I have +15 ban resistance. They wear off fast.
 
@EvanCarroll no, @PaulWhite
46 mins ago, by Paul White
Ok out of here for a few hours. Have fun.
 
@Lamak 46 minutes is almost an hour
that's all the sleep @PaulWhite needs
(doink)
 
Indeed
 
what's with the doink??
 
7:57 PM
That's the sound of being mentioned
 
@Lamak It was a science experiment a week or 2 ago, what will or will not make the "doink" sound
 
MVCC transaction levels are mind boggling complex. I think in all my DB work I've only had issues with transactions level, like once or twice. Even refreshing on this stuff is gruelingly painful.
 
It goes DOINK
4
 
I see
 
You should make that your ring tone @PaulWhite
 
7:58 PM
^ that
 
@bluefeet Great idea
 
Also, there may be a secret hat when you send @PaulWhite a 100 doinks
 
@TomV I'm all for that hat
isn't that right, @PaulWhite?
 
@TomV that'd be evil. I'll add it to the list for next year
4
 
@PaulWhite did you read that comment?
 
7:59 PM
@TomV If so, it could be neither confirmed nor denied!
 
@TomV Do you mean the Annoy-a-tron hat? I already have it :)
 
@PaulWhite exactly
 
@PaulWhite The possibility has been confirmed, you're in trouble next season
 
@Lamak Hard to know on mobile chat
 
didn't took mobile chat into account, seems like this hat won't be that easy to get
 
8:01 PM
@TypoCubeᵀᴹ Ah I didn't realise that it wasn't standard SQL. I searched a bit more and found a comment here stackoverflow.com/a/2438333/73226 that indicates that they may have some utility in Postgres for partitioning.
 
@TomV I can only hope that more amusing possibilities will present themselves in the meantime, or memories will fade
 
@PaulWhite never, it's already on the spreadsheet for next year :P
I'm think it will be a cat hat, just because @PaulWhite enjoys cat videos
And you get the hat by pinging @PaulWhite in chat with a cat video
7
 
@PaulWhite {"ErrorMessage":"You cannot schedule an event more than 100 days in advance"}
2
 
@bluefeet ha ha ha ha that's purrfect
3
Can't quite believe I made that pun
 
your wife would be proud for sure
 
8:07 PM
Hats do funny things
 
Inappropriate joke retracted :)
 
I gave up!
 
Ohhhhh look at all those (removed) that aren't me.
ya'll can't behave.
 
those are deleted by the user that made them
 
I would ban them for self-censorship. All your thoughts are belong to us.
 
8:20 PM
They still belong to Room Owners which is most of the regulars
:34528706 shoot, forgot about that
 
Not really ;) That was a test by the way. Wasn't sure it would succeed!
 
@TypoCubeᵀᴹ For science
 
@TypoCubeᵀᴹ I meant from the banhammering that @EvanCarroll mentioned
 
things that go DOINK in the night
2
 
@TypoCubeᵀᴹ that said, diamond > RO, so there could've been SEMODPOWER SMACKDOWN if we so chjose to do so. 'Course, I like my diamond so that wouldn't have happened :)
 
8:23 PM
@ThomasWard yes, that is certain. Mods can't be banned. At least by non-mods.
 
is DOINK now a meme for here? I think it is at this point
 
@ThomasWard I checked, there is no kick-mute on your user, unfortunately
 
@TypoCubeᵀᴹ Truth is truth :)
heh
@TypoCubeᵀᴹ Mods can't ban mods either. one of the U&L mods and I both decided to sniper-fest each other and test that.
 
And CM > mod
 
Pretty sure the CMs could outright nuke a mod and ban them, but eh
@PaulWhite you were only a second faster heh
 
8:25 PM
@ThomasWard why are CMs and staff different in your sentence?
 
Community Managers (CMs) > Community-Elected Site Moderators > Room Owner > Regular peons Users.
@bluefeet Good question. :)
 
@ThomasWard the force is strong with him. Despite the cat feeds
 
We need @bluefeet to test a kick-mute on @ThomasWard, for science
/JK
 
throws Python-fu at @PaulWhite. For science.
 
and see if we get a doink
 
8:27 PM
@ThomasWard Plus time zone and mobile chat lag 😂
 
truth
 
@bluefeet because CMs are ... "different"
 
I would speculate that Dev > CM
 
@PaulWhite :(
 
From a pure power perspective. Clearly Dev < CM if the CM can pivot
 
8:34 PM
and CDN > *
if the CDN goes down, everything is dead
:P
 
Nah we'd just blame caching
 
@PaulWhite If something's wrong, it's the cache.
 
i thought we just blamed the DBA
so much for a few hours, eh @PaulWhite ?
 
I was getting to the part where DBA > Dev 😉
And I'll be out of DOINK range shortly
 
DOINK that
 
 
1 hour later…
9:48 PM
whelpppp second tumbleweed answered
 
 
1 hour later…
10:50 PM
0
A: Closing questions ... what's the policy as it pertains to this one?

Max VernonI was the first person who voted-to-close the question. However, I did not do that because I'm a SQL Server guy 1, and you're not. I took that action because, in my opinion, the question is not likely to be of any great value to future visitors since it explicitly denies use of the most com...

 

« first day (2191 days earlier)      last day (2681 days later) »