public inbox for [email protected]help / color / mirror / Atom feed
[PATCH] pgweb: Add SEARCH_DSN to example settings.py 5+ messages / 3 participants [nested] [flat]
* [PATCH] pgweb: Add SEARCH_DSN to example settings.py @ 2021-10-22 15:08 Célestin Matte <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Célestin Matte @ 2021-10-22 15:08 UTC (permalink / raw) To: PostgreSQL WWW <[email protected]> Hello, Defining SEARCH_DSN is necessary to install the search functionality in pgweb, although this is not explained anywhere. This patch adds SEARCH_DSN in the example settings.py so that users know that this variable must be defined. Cheers, -- Célestin Matte Attachments: [text/x-patch] 0001-Add-SEARCH_DSN-to-example-settings.py.patch (1.2K, 2-0001-Add-SEARCH_DSN-to-example-settings.py.patch) download | inline diff: From d738f255fc15f7f6ff26ac632b4060f9d2ff079d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <[email protected]> Date: Fri, 22 Oct 2021 17:05:39 +0200 Subject: [PATCH] Add SEARCH_DSN to example settings.py --- pgweb/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pgweb/settings.py b/pgweb/settings.py index 6c1cb24e..83b4b39d 100644 --- a/pgweb/settings.py +++ b/pgweb/settings.py @@ -164,6 +164,7 @@ VARNISH_PURGERS = () # Extra servers that DO_ESI = False # Generate ESI tags ARCHIVES_SEARCH_SERVER = "archives.postgresql.org" # Where to post REST request for archives search ARCHIVES_SEARCH_PLAINTEXT = False # Contact ARCHIVES_SEARCH_SERVER with http instead of https +SEARCH_DSN = "dbname=pgsearch" # database for search, see tools/search/sql/README FRONTEND_SMTP_RELAY = "magus.postgresql.org" # Where to relay user generated email OAUTH = {} # OAuth providers and keys PGDG_ORG_ID = -1 # id of the PGDG organisation entry -- 2.33.1 ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] pgweb: Add SEARCH_DSN to example settings.py @ 2021-10-22 16:10 Jonathan S. Katz <[email protected]> parent: Célestin Matte <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Jonathan S. Katz @ 2021-10-22 16:10 UTC (permalink / raw) To: Célestin Matte <[email protected]>; PostgreSQL WWW <[email protected]> On 10/22/21 11:08 AM, Célestin Matte wrote: > Hello, > > Defining SEARCH_DSN is necessary to install the search functionality in pgweb, although this is not explained anywhere. > This patch adds SEARCH_DSN in the example settings.py so that users know that this variable must be defined. ...this perhaps explains why I've never gotten the search utility to work in my local environment. In general I'm OK with this, but perhaps we leave the string empty with instructions to fill the connection string to the DB that is hosting the search schema. Jonathan Attachments: [application/pgp-signature] OpenPGP_signature (840B, 2-OpenPGP_signature) download ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] pgweb: Add SEARCH_DSN to example settings.py @ 2021-10-22 16:23 Magnus Hagander <[email protected]> parent: Jonathan S. Katz <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Magnus Hagander @ 2021-10-22 16:23 UTC (permalink / raw) To: Jonathan S. Katz <[email protected]>; +Cc: Célestin Matte <[email protected]>; PostgreSQL WWW <[email protected]> On Fri, Oct 22, 2021 at 6:10 PM Jonathan S. Katz <[email protected]> wrote: > On 10/22/21 11:08 AM, Célestin Matte wrote: > > Hello, > > > > Defining SEARCH_DSN is necessary to install the search functionality in > pgweb, although this is not explained anywhere. > > This patch adds SEARCH_DSN in the example settings.py so that users know > that this variable must be defined. > > ...this perhaps explains why I've never gotten the search utility to > work in my local environment. > > In general I'm OK with this, but perhaps we leave the string empty with > instructions to fill the connection string to the DB that is hosting the > search schema. > I think having a default like in this patch is better. Otherwise it could randomly connect to a database with the same name as the user for example, which might actually happen in dev scenarios. So if we want it empty we'd also need to add code to check if it's set or not before trying to use it - seems easier to set the default and have it fail :) -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/; Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/; ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] pgweb: Add SEARCH_DSN to example settings.py @ 2022-01-19 14:30 Célestin Matte <[email protected]> parent: Magnus Hagander <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Célestin Matte @ 2022-01-19 14:30 UTC (permalink / raw) To: Magnus Hagander <[email protected]>; +Cc: PostgreSQL WWW <[email protected]> Hi, I'm reviewing the patches I sent a few months ago and this short one seems to have been left mid-discussion. > I think having a default like in this patch is better. Otherwise it could randomly connect to a database with the same name as the user for example, which might actually happen in dev scenarios. So if we want it empty we'd also need to add code to check if it's set or not before trying to use it - seems easier to set the default and have it fail :) I guess it's OK as-is, then? -- Célestin Matte ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [PATCH] pgweb: Add SEARCH_DSN to example settings.py @ 2022-01-19 22:30 Magnus Hagander <[email protected]> parent: Célestin Matte <[email protected]> 0 siblings, 0 replies; 5+ messages in thread From: Magnus Hagander @ 2022-01-19 22:30 UTC (permalink / raw) To: Célestin Matte <[email protected]>; +Cc: PostgreSQL WWW <[email protected]> On Wed, Jan 19, 2022 at 3:30 PM Célestin Matte <[email protected]> wrote: > > Hi, > > I'm reviewing the patches I sent a few months ago and this short one seems to have been left mid-discussion. > > > I think having a default like in this patch is better. Otherwise it could randomly connect to a database with the same name as the user for example, which might actually happen in dev scenarios. So if we want it empty we'd also need to add code to check if it's set or not before trying to use it - seems easier to set the default and have it fail :) > > I guess it's OK as-is, then? Yeah, indeed that was forgotten. Patch now conflicted with your own patch for archives frontend address. I adjusted it for that and applied. Thanks! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-01-19 22:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-10-22 15:08 [PATCH] pgweb: Add SEARCH_DSN to example settings.py Célestin Matte <[email protected]> 2021-10-22 16:10 ` Jonathan S. Katz <[email protected]> 2021-10-22 16:23 ` Magnus Hagander <[email protected]> 2022-01-19 14:30 ` Célestin Matte <[email protected]> 2022-01-19 22:30 ` Magnus Hagander <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox