Re: are the 2 if-statements in join_is_legal() removable?

2025-05-10 Thread Tom Lane
g l  writes:
> In join_is_legal(), there are 2 decision-making statements based on 
> match_sjinfo. Iwonder wether their conditions can ever test possitive.

The code coverage report says yes.

https://coverage.postgresql.org/src/backend/optimizer/path/joinrels.c.gcov.html#350

regards, tom lane




Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-10 Thread איתי זרחוביץ
Thanks, I will!

On Fri, 9 May 2025 at 9:11 Philipp Defner  wrote:

> Go to https://postgresapp.com/downloads.html, download the app, install
> and connect to the running instance with your Postgres GUI client of
> choice. If it's an important part of your studies you should be able to
> figure out to get it running too.
>
> The error message you originally shared isn't a Postgres issue but a macOS
> issue.
>
> On Fri, May 9, 2025, at 1:57 PM, איתי זרחוביץ wrote:
>
> Ok
> So, in order to install it well, what are the steps that i need to take
> from the beginning?
> I already have the application on my Mac but it doesn’t want
>
> On Fri, 9 May 2025 at 8:43 Philipp Defner  wrote:
>
>
> Hey, please use "Reply All" when you reply (As someone else already told
> you before I saw), as otherwise the response only goes to me directly and
> nobody else can follow along or help you.
>
> After a quick online search it seems that this error means you don't have
> Rosetta installed, this is the emulation layer that Apple provides to run
> Apps built for Intel on Apple Silicon Mac.
>
> If you run this in your Terminal, it might not say "rosetta installed":
> "if /usr/bin/pgrep -q oahd; then echo 'rosetta installed'; fi"
>
> I'd try Postgres.app from the download page I mentioned, or install
> Rosetta: "/usr/sbin/softwareupdate --install-rosetta --agree-to-license"
>
> On Fri, May 9, 2025, at 1:31 PM, איתי זרחוביץ wrote:
>
> Hey,
> I tried to install PostrgreSQL,version 17.5 via
> https://www.postgresql.org/download/macosx/.
> When the download was complete, the application opened. I clicked 'next'
> to process and finish the installation, and finally, when I tried to open
> the application,
> it showed me this error:
> _LSOpenURLsWithCompletionHandler() failed with error -10669 (1)
> I also tried to install version 16.9 and I got the same error
>
> ‫בתאריך יום ו׳, 9 במאי 2025 ב-8:12 מאת ‪Philipp Defner‬‏ <‪
> m...@notmyhostna.me‬‏>:‬
>
>
> Hey, you'll need to give a bit more information here. How did you install
> Postgres and what are you doing to see this error message?
>
> There's multiple ways recommended on
> https://www.postgresql.org/download/macosx/, personally I'd
> give Postgres.app a. try or the installation via Homebrew (A bit less easy
> than the GUI app)
>
> Philipp
>
> On Thu, May 8, 2025, at 8:17 PM, איתי זרחוביץ wrote:
>
> ,Hello
> I have a MacBook with an M4 chip. I tried installing PostgreSQL version
> 17.5, but after the
> installation, I received the following error
> _LSOpenURLsWithCompletionHandler() failed with error -10669 (1)
> .and the application fails to launch
>
> A screenshot of the error is attached for reference
>
>
>
> .I also tried installing older versions, but encountered the same error
> I contacted Apple Support, and they confirmed that my device is working
> properly
>
>
> Your software is very important for my studies, and I would greatly
> appreciate your help in resolving this issue
>
> Thanks,
>
> Etay
>
> *Attachments:*
>
>- WhatsApp Image 2025-05-07 at 08.23.48.jpeg
>
>
>
>
>


Re: Issue Launching PostgreSQL on MacBook M4 – Error -10669‏

2025-05-10 Thread איתי זרחוביץ
Ok
So, in order to install it well, what are the steps that i need to take
from the beginning?
I already have the application on my Mac but it doesn’t want

On Fri, 9 May 2025 at 8:43 Philipp Defner  wrote:

> Hey, please use "Reply All" when you reply (As someone else already told
> you before I saw), as otherwise the response only goes to me directly and
> nobody else can follow along or help you.
>
> After a quick online search it seems that this error means you don't have
> Rosetta installed, this is the emulation layer that Apple provides to run
> Apps built for Intel on Apple Silicon Mac.
>
> If you run this in your Terminal, it might not say "rosetta installed":
> "if /usr/bin/pgrep -q oahd; then echo 'rosetta installed'; fi"
>
> I'd try Postgres.app from the download page I mentioned, or install
> Rosetta: "/usr/sbin/softwareupdate --install-rosetta --agree-to-license"
>
> On Fri, May 9, 2025, at 1:31 PM, איתי זרחוביץ wrote:
>
> Hey,
> I tried to install PostrgreSQL,version 17.5 via
> https://www.postgresql.org/download/macosx/.
> When the download was complete, the application opened. I clicked 'next'
> to process and finish the installation, and finally, when I tried to open
> the application,
> it showed me this error:
> _LSOpenURLsWithCompletionHandler() failed with error -10669 (1)
> I also tried to install version 16.9 and I got the same error
>
> ‫בתאריך יום ו׳, 9 במאי 2025 ב-8:12 מאת ‪Philipp Defner‬‏ <‪
> m...@notmyhostna.me‬‏>:‬
>
>
> Hey, you'll need to give a bit more information here. How did you install
> Postgres and what are you doing to see this error message?
>
> There's multiple ways recommended on
> https://www.postgresql.org/download/macosx/, personally I'd
> give Postgres.app a. try or the installation via Homebrew (A bit less easy
> than the GUI app)
>
> Philipp
>
> On Thu, May 8, 2025, at 8:17 PM, איתי זרחוביץ wrote:
>
> ,Hello
> I have a MacBook with an M4 chip. I tried installing PostgreSQL version
> 17.5, but after the
> installation, I received the following error
> _LSOpenURLsWithCompletionHandler() failed with error -10669 (1)
> .and the application fails to launch
>
> A screenshot of the error is attached for reference
>
>
>
> .I also tried installing older versions, but encountered the same error
> I contacted Apple Support, and they confirmed that my device is working
> properly
>
>
> Your software is very important for my studies, and I would greatly
> appreciate your help in resolving this issue
>
> Thanks,
>
> Etay
>
> *Attachments:*
>
>- WhatsApp Image 2025-05-07 at 08.23.48.jpeg
>
>
>
>


are the 2 if-statements in join_is_legal() removable?

2025-05-10 Thread g l
Hi:
In join_is_legal(), there are 2 decision-making statements based on 
match_sjinfo. Iwonder wether their conditions can ever test possitive.

/*
 * If one input contains min_lefthand and the other contains
 * min_righthand, then we can perform the SJ at this join.
 *
 * Reject if we get matches to more than one SJ; that implies we're
 * considering something that's not really valid.
 */
if (bms_is_subset(sjinfo->min_lefthand, rel1->relids) &&
  bms_is_subset(sjinfo->min_righthand, rel2->relids))
{
  if (match_sjinfo)
return false; /* invalid join path */
  match_sjinfo = sjinfo;
  reversed = false;
}
else if (bms_is_subset(sjinfo->min_lefthand, rel2->relids) &&
 bms_is_subset(sjinfo->min_righthand, rel1->relids))
{
  if (match_sjinfo)
return false; /* invalid join path */
  match_sjinfo = sjinfo;
  reversed = true;
}
There is no query in regression test suite that can render the 2 
decision-makings based on match_sjinfo true, nor can i figure out one. Can 
these conditions ever be true? If they can be true, what queries can make them 
true? On the contrary,if the conditions can never be true, then the 2 "if 
(match_sjinfo) return false" statements can be safely removed.
Any feedback is welcome.

--
Best Regards
Geng





Re: Is anyone up for hosting the online PG game "Schemaverse"?

2025-05-10 Thread Joshua McDougall
Hi Merlin,

The core database portion isn’t too complicated to get setup, it’s a sqitch 
project. There are a couple Perl scripts that run continuously in a screen 
session as well. 

The web interfaces are a little dated and need some fiddling to get 
operational. This tends to be the most complicated part to get running lately. 

I would happily help either by answering questions, or by directly working on 
the system. I could also spend some time getting it all working smoothly via 
docker if a container was preferred. 

Thanks for your interest!
Josh


> On May 5, 2025, at 7:15 PM, Merlin Moncure  wrote:
> 
> On Thu, May 1, 2025 at 5:23 PM Justin Clift  > wrote:
>> Hi all,
>> 
>> The PostgreSQL game "Schemaverse" was removed from the PostgreSQL 
>> website's
>> links a few months ago because it no longer had hosting.
>> 
>> Does anyone around have spare server/vm/something that could be used to
>> host it (for free)?
> 
> I might be interested.  Is it difficult to set up?
> 
> merlin