Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2022-11-22 Thread Kirk Wolak
On Tue, Nov 22, 2022 at 5:51 PM Thomas Munro wrote: > On Tue, Nov 22, 2022 at 4:25 AM Kirk Wolak wrote: > > In researching this problem, it appears that the decision was made > like 17yrs ago, when windows did not have a realistic "terminal" type > interface. Assuming we target Windows 8.1 or

Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2022-11-22 Thread Kirk Wolak
On Mon, Nov 21, 2022 at 1:10 PM Dominique Devienne wrote: > On Mon, Nov 21, 2022 at 6:12 PM Kirk Wolak wrote: > > On Mon, Nov 21, 2022 at 11:01 AM Dominique Devienne > wrote: > > > FWIW, I've been using https://github.com/arangodb/linenoise-ng for > Linux and Windows, > > > > I've look at linen

Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2022-11-22 Thread Thomas Munro
On Tue, Nov 22, 2022 at 4:25 AM Kirk Wolak wrote: > In researching this problem, it appears that the decision was made like > 17yrs ago, when windows did not have a realistic "terminal" type interface. > Assuming we target Windows 8.1 or higher, I believe this goes away. FWIW PostgreSQL 16 w

Re: Puzzled by ROW constructor behaviour?

2022-11-22 Thread David G. Johnston
On Tue, Nov 22, 2022 at 2:11 PM Eagna wrote: > > NUMBER 2 > > > SELECT ROW(1, 2.5, 'this is a test') = (VALUES (1, 2.5, 'this is a > test')) AS test2; > > My question is that if a ROW constructor works for a VALUES clause in > statement NUMBER 2, then why not NUMBER 3? > You've drawn a false equ

Re: Upgrading to v12

2022-11-22 Thread Adrian Klaver
On 11/22/22 12:53, Brad White wrote: On 11/18/2022 6:34 PM, Adrian Klaver wrote: On 11/18/22 16:05, Brad White wrote: --> The Microsoft Access database engine stopped the process because you and another user are attempting to change the same data at the same time. Code in question:       

Re: Puzzled by ROW constructor behaviour?

2022-11-22 Thread Steve Baldwin
Hi Eagna, Did you check the syntax of the INSERT statement? You either need 'VALUES ...' or a query. I don't think your expression on its own is considered a query. Cheers, Steve On Wed, Nov 23, 2022 at 8:11 AM Eagna wrote: > > Hi all, > > I'm puzzled by some behaviour of the ROW constructor

Puzzled by ROW constructor behaviour?

2022-11-22 Thread Eagna
Hi all, I'm puzzled by some behaviour of the ROW constructor that I noticed when I was playing around. >From the documentation >(https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS), > we have NUMBER 1 > SELECT ROW(1,2.5,'this is a test') = ROW(1, 3, 'no

Re: Upgrading to v12

2022-11-22 Thread Brad White
On 11/18/2022 6:34 PM, Adrian Klaver wrote: On 11/18/22 16:05, Brad White wrote: --> The Microsoft Access database engine stopped the process because you and another user are attempting to change the same data at the same time. Code in question:       rst!Update  <-- success       rst!Qty

Re: security label and indexes

2022-11-22 Thread Tom Lane
Ted Toth writes: > I noticed that the 'security label' sql command does not include indexes as > objects that can be labeled, why is that? What sepgsql security class are > indexes, db_table? Indexes don't have security labels, just as they don't have SQL permissions. From a security standpoint,

Re: copying json data and backslashes

2022-11-22 Thread Erik Wienhold
> On 22/11/2022 20:11 CET p...@cmicdo.com wrote: > > On Tuesday, November 22, 2022 at 01:16:02 PM EST, Peter J. Holzer > wrote: > > > On 2022-11-22 17:39:04 +, Alastair McKinley wrote: >  > > > \copy footable from 'input.json' (format csv, escape '^B', delimieter > '^C > ', quote '^E') >  >

Re: copying json data and backslashes

2022-11-22 Thread p...@cmicdo.com
On Tuesday, November 22, 2022 at 01:16:02 PM EST, Peter J. Holzer wrote:  > On 2022-11-22 17:39:04 +, Alastair McKinley wrote:  > > > \copy footable from 'input.json' (format csv, escape '^B', delimieter '^C ', quote '^E')  > > >  > > > where the control characters are the actual con

security label and indexes

2022-11-22 Thread Ted Toth
I noticed that the 'security label' sql command does not include indexes as objects that can be labeled, why is that? What sepgsql security class are indexes, db_table? Ted

Re: copying json data and backslashes

2022-11-22 Thread Peter J. Holzer
On 2022-11-22 17:39:04 +, Alastair McKinley wrote: > > \copy footable from 'input.json' (format csv, escape '^B', delimieter '^C', > > quote '^E') > > > > where the control characters are the actual control char, not the > > caret-letter, and it requires no escaping escapes.  I realize this >

Re: copying json data and backslashes

2022-11-22 Thread Alastair McKinley
> From: p...@cmicdo.com > Sent: 22 November 2022 15:30 > To: Alastair McKinley ; > pgsql-general@lists.postgresql.org ; Erik > Wienhold > Subject: Re: copying json data and backslashes >   >  > >  > On Tuesday, November 22, 2022 at 10:16:11 AM EST, Erik Wienhold > wrote: >  > >  > >  > >

Re: system variable can be edited by all user?

2022-11-22 Thread Adrian Klaver
On 11/21/22 22:25, chris navarroza wrote: Hi, Ive created a read only user (SELECT PRIVILEGE) but it turns out that this user can do this queries: SHOW work_mem; SET work_mem='40MB'; How do I limit him? Short answer is what Laurenz Albe posted. Long answer is: From: https://www.postgresql

Re: copying json data and backslashes

2022-11-22 Thread p...@cmicdo.com
 >  > On Tuesday, November 22, 2022 at 10:16:11 AM EST, Erik Wienhold wrote:  >  >  > > On 22/11/2022 15:23 CET Alastair McKinley wrote:  > >  > > Hi all,  > >  > > I have come across this apparently common issue COPY-ing json and wondering if  > > there is potentially a better solution.  >

Re: copying json data and backslashes

2022-11-22 Thread Erik Wienhold
> On 22/11/2022 15:23 CET Alastair McKinley > wrote: > > Hi all, > > I have come across this apparently common issue COPY-ing json and wondering if > there is potentially a better solution. > > I am copying data into a jsonb column originating from a 3rd party API. The > data may have literal \r,

copying json data and backslashes

2022-11-22 Thread Alastair McKinley
Hi all, I have come across this apparently common issue COPY-ing json and wondering if there is potentially a better solution. I am copying data into a jsonb column originating from a 3rd party API. The data may have literal \r,\t,\n and also double backslashes. I discovered that I can cast t

Re: system variable can be edited by all user?

2022-11-22 Thread Laurenz Albe
On Tue, 2022-11-22 at 14:25 +0800, chris navarroza wrote: > Ive created a read only user (SELECT PRIVILEGE) but it turns out that this > user > can do this queries: SHOW work_mem; SET work_mem='40MB'; How do I limit him? We call these "configuration parameters", and there is no way you can preven

system variable can be edited by all user?

2022-11-22 Thread chris navarroza
Hi, Ive created a read only user (SELECT PRIVILEGE) but it turns out that this user can do this queries: SHOW work_mem; SET work_mem='40MB'; How do I limit him? Thanks, Butching