« first day (1790 days earlier)      last day (3084 days later) » 

11:12 AM
Can someone tell which answer I should accept here?
8
Q: Checking whether two tables have identical content in PostgreSQL

Faheem MithaThis has already been asked on Stack Overflow, but only for MySQL. I'm using PostgreSQL. Unfortunately (and surprisingly) PostgreSQL does not seem to have something like CHECKSUM table. A PostgreSQL solution would be fine, but a generic one would be better. I found http://www.besttechtools.com/a...

Thanks.
I was thinking the gsiems answer, but I now no longer remember the context that well.
 
 
8 hours later…
6:44 PM
@FaheemMitha I personally don't think it's up to us to decide, You asked the question, so it's up to you to decide what worked best. We have voting rights just like every other member of the community does, but accepting an answer is a privilege for the OP
 
@TomV Well, I'm not sure which is a better answer, 1 or 2.
 
@FaheemMitha which solution did you implement?
 
@FaheemMitha Accepting is not really about which answer is best, it's more about which one worked for the one who asked the question (i.e. you).
The two often coincide but they don't have to.
 
^^this, voting is to make the better answer stand out, accepting is for the OP to let the community know what worked in his case
 
@TomV Unfortunately, I forget. It's been a while.
@AndriyM Yes, I know the purpose of the accept. But it's been a while and now I can't remember the context of the question. And I don't want to accept an incorrect answer. Are either 1 or 2 reasonable choices?
 
6:59 PM
@FaheemMitha I don't PostreSQL enough to know, but both have upvotes only so I suppose
 
@TomV ok
 
@FaheemMitha The two solutions differ in terms of the output format and they may also have different performance. However, they both seem to produce the requested result, so it's really hard for us to judge which one is better. Your question doesn't specify the expected result, so either could work for you.
 
@AndriyM Ok
Thanks for the comments, everyone.
 
7:20 PM
@AndriyM fwiw I think the full outer join is more elegant and likely faster in most cases
what does @ypercube think?
 
@JackDouglas And I think it can be changed to produce the same output as the other answer using LATERAL CROSS JOIN, if necessary.
 
So your saying anything can cause the error above. Great ,thanks for your input Tom V. — FortunateDuke 7 mins ago
whatever :)
@FortunateDuke the key of my comment was that we need more info. Sorry for trying to be helpful. — Tom V 1 min ago
 
@AndriyM not sure it would retain it's advantage in elegance or performance if you did though — would be interested to know :)
 
7:41 PM
@JackDouglas Isn't elegance in the eye of the beholder? :) Anyway, what I meant was along these lines: SELECT x.* FROM a FULL JOIN b USING (key) LATERAL CROSS JOIN (SELECT a.* WHERE a.key IS NOT NULL UNION ALL SELECT b.* WHERE b.key IS NOT NULL) AS x WHERE a.key IS NULL OR b.key IS NULL;. Hm, probably not very elegant by any standard :)
 
@AndriyM :)
 
he took offense I guess
 
@TomV In their defence, formatting the error message was a little too much. They could have restored just that, though.
 
I edited the code tags before formatting as a quote, I should've removed those yes
 
I agree that they probably chose to disregard the edit because it was by a person who'd just posted a sarcastic comment.
 
7:53 PM
of which i'm guilty I agree
 
Could be a duplicate of this:
2
Q: Using OPENQUERY to execute a script

user802599I have a SQL Server 2008 instance which I want to use to import data from an Oracle server. I have set up a linked server that works correctly when running simple queries like SELECT * FROM table. However, if I declare a variable or loop through the rows in a table or anything else inside the OP...

 
I'm not voting first, I'm the boogyman already
 
@TomV Do you agree though?
 
honestly, not really
oracle <> db2
and both are crap questions listing no detail
 
I could vote straight away, I just want to be sure if it qualifies. Others might vote without giving much thought to it.
I'm considering it solely based on Paul's answer to the other question.
 
8:06 PM
tried to clean up a bit — feel free to flag if it degenerates...
once things start to go downhill, they often don't stop :|
 
@JackDouglas thanks, that looks a lot better
I'll refrain from heating the discussion on that post
 
 
4 hours later…
11:38 PM
Is the EXISTS keyword unique to PG, per dba.stackexchange.com/a/72642/1319?
 
11:56 PM
@FaheemMitha It's supported by probably any major SQL product, and the answer doesn't seem to suggest that it's unique to PG. Why do you think it does?
 
@AndriyM I misread something. Sorry.
 
@FaheemMitha No worries.
 

« first day (1790 days earlier)      last day (3084 days later) »