Re: Using psql's \prompt command [RESOLVED]

2025-01-30 Thread Rich Shepard
On Thu, 30 Jan 2025, Rich Shepard wrote: Thanks again, David. I didn't know that's the section I need. David/Ron, et al.: Got it (example on page 2126 of the doc): -- Display person_nbr, lname, fname, direct_phone, email from people, contact history from contacts. -- prompt for person_nbr be

Re: Using psql's \prompt command

2025-01-30 Thread Rich Shepard
On Thu, 30 Jan 2025, David G. Johnston wrote: That is what \prompt is for. You have the correct meta-command, you were capturing user input just fine. Read about how to use variables in queries for the part you are missing. Specifically the section of the psql docs titled: SQL Interpolation

Re: Using psql's \prompt command

2025-01-30 Thread David G. Johnston
On Thu, Jan 30, 2025 at 3:46 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Jan 30, 2025 at 3:44 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Thu, Jan 30, 2025 at 3:38 PM Rich Shepard >> wrote: >> >>> On Thu, 30 Jan 2025, Rich Shepard wrote: >>> >>> > T

Re: Using psql's \prompt command

2025-01-30 Thread David G. Johnston
On Thu, Jan 30, 2025 at 3:44 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Jan 30, 2025 at 3:38 PM Rich Shepard > wrote: > >> On Thu, 30 Jan 2025, Rich Shepard wrote: >> >> > Thank you. I'll look into using the \set command. >> >> My web searches find many examples of using

Re: Using psql's \prompt command

2025-01-30 Thread David G. Johnston
On Thu, Jan 30, 2025 at 3:38 PM Rich Shepard wrote: > On Thu, 30 Jan 2025, Rich Shepard wrote: > > > Thank you. I'll look into using the \set command. > > My web searches find many examples of using the \set command, but none > getting user input with \prompt. > > Please point me to a reference w

Re: Using psql's \prompt command

2025-01-30 Thread Ron Johnson
On Thu, Jan 30, 2025 at 5:28 PM Rich Shepard wrote: > On Thu, 30 Jan 2025, David G. Johnston wrote: > > > Prompt isn’t your issue. Prompt stores the value into a variable. Read > how > > to reference variables in a psql script. > > David, > > Thank you. I'll look into using the \set command. > I

Re: Using psql's \prompt command

2025-01-30 Thread Rich Shepard
On Thu, 30 Jan 2025, Rich Shepard wrote: Thank you. I'll look into using the \set command. My web searches find many examples of using the \set command, but none getting user input with \prompt. Please point me to a reference where I can learn how to get the user input string into the script.

Re: Using psql's \prompt command

2025-01-30 Thread Rich Shepard
On Thu, 30 Jan 2025, David G. Johnston wrote: Prompt isn’t your issue. Prompt stores the value into a variable. Read how to reference variables in a psql script. David, Thank you. I'll look into using the \set command. Rich

Using psql's \prompt command

2025-01-30 Thread Rich Shepard
I want to use the \prompt command to get user input for a query. My script fails: -- Display person_nbr, lname, fname, direct_phone, email from people, contact history from contacts. -- prompt for person_nbr before selecting rows: \prompt 'Enter person_nbr: ' store select p.person_nbr, p.lname

Re: Using psql's \prompt command

2025-01-30 Thread David G. Johnston
On Thursday, January 30, 2025, Rich Shepard wrote: > > > What's the correct syntax for the \prompt? > Prompt isn’t your issue. Prompt stores the value into a variable. Read how to reference variables in a psql script. David J.

Re: could not accept ssl connection tlsv1 alert unknown ca

2025-01-30 Thread Tom Lane
"Zwettler Markus (OIZ)" writes: > However, one client also configured some client certificates + > "sslmode=prefer" which resulted in "could not accept ssl connection tlsv1 > alert unknown ca". I'm no expert, but I think this typically means a missing or untrusted intermediate certificate, that

could not accept ssl connection tlsv1 alert unknown ca

2025-01-30 Thread Zwettler Markus (OIZ)
We wanted to use pure ssl encryption without certificate validation. We created and configured self-signed certificates at the postgres server, turned "sslmode=on" and advised our clients to use "sslmode=prefer". This worked very well. However, one client also configured some client certificate

Re: Ideas about presenting data coming from sensors

2025-01-30 Thread Adrian Klaver
On 1/30/25 06:18, Achilleas Mantzios - cloud wrote: Dear PostgreSQL people We have a project having to do with capturing sensor data and alarms from various machinery using various protocols/standards (e.g. NMEA , MODBUS). We have about 150 sites (vessels of various types) and each site will

Ideas about presenting data coming from sensors

2025-01-30 Thread Achilleas Mantzios - cloud
Dear PostgreSQL people We have a project having to do with capturing sensor data and alarms from various machinery using various protocols/standards (e.g. NMEA , MODBUS). We have about 150 sites (vessels of various types) and each site will generate about 500 rows per minute. We have solved mo