libpq PQexecParams & value placeholders

2018-12-14 Thread Oleg
Hi, all. Do we really need a numeric value placeholders like $1 in command string? Construction of such string for complex non-static queries is very annoying. Why do we can't simply use $$ placeholder, which take the next value from an array of values? -- Олег Неманов (Oleg Nemanov)

Re: libpq PQexecParams & value placeholders

2018-12-14 Thread Oleg
On Fri, Dec 14, 2018 at 02:47:12PM +0300, Dmitry Igrishin wrote: > пт, 14 дек. 2018 г. в 14:33, Oleg : > > > > Hi, all. > > > > Do we really need a numeric value placeholders like $1 in command string? > It's a syntax defined at the backend side. > (https

Re: Trouble matching a nested value in JSONB entries

2018-07-03 Thread Oleg Bartunov
On Wed, Jun 20, 2018 at 10:06 PM, Enrico Thierbach wrote: > Hi list, > > I have some trouble matching a value in a JSONB object against multiple > potential matches. > > Lets say, I have a table with an id, and a metadata JSONB column, which > holds data like the following > > 1 | {"group_id": 1}

Re: tsvector not giving expected results on one host

2022-12-21 Thread Oleg Bartunov
Dan, it's always good to specify configuration name in a query to avoid recheck, since websearch_to_tsquery(regconfig, text) is immutable, while websearch_to_tsquery(text) is stable. See the difference: [local]:5433 oleg@oleg=# explain (analyze,costs off) select title from apod

Re: tsvector not giving expected results on one host

2022-12-21 Thread Oleg Bartunov
I On Wed, Dec 21, 2022 at 1:12 PM Oleg Bartunov wrote: > > Dan, > > it's always good to specify configuration name in a query to avoid > recheck, since > websearch_to_tsquery(regconfig, text) is immutable, while > websearch_to_tsquery(text) is stable. immutable f

Re: update field in jsonb

2017-11-22 Thread Oleg Bartunov
On Thu, Nov 23, 2017 at 4:45 AM, support-tiger wrote: > is there a way to update a single field in jsonb without replacing the > entire json document - couldn't find an example > > for example > > create table test (id primary key, data jsonb); > > insert into test ({"name":"bill", "age":29}); > >

Re: update field in jsonb

2017-11-24 Thread Oleg Bartunov
On Fri, Nov 24, 2017 at 3:46 AM, support-tiger wrote: > Oleg, > > hey, thanks so much - if you are in USA visiting Yellowstone Natl Park > contact me and the beer is on me (maybe a Wyoming steak too!) Seriously ? btw, in PG 11 we expect subscription index update test set da