Re: pg_stat_statements IN problem

2023-10-02 Thread Wim Bertels
byme@byme.email schreef op ma 02-10-2023 om 16:19 [+]: > > > Is there a possibility the pg_stat_statements will be improved with > handling IN? This problem makes it so much less useful right now. not sure what the question is, but if you change pg_stat_statements with another view/table,

Re: specifying multiple options in URI psql behaviour?

2023-10-02 Thread Wim Bertels
Tom Lane schreef op ma 02-10-2023 om 10:21 [-0400]: > Wim Bertels writes: > > * but if you put more than 1 option, then it doesn't?: > > > #psql > > postgresql://myuser@myserver/mydb?connect_timeout=10_session > > _attrs=any > > Maybe you forgot

specifying multiple options in URI psql behaviour?

2023-10-02 Thread Wim Bertels
Hello, can anyone confirm this?: * connections with at most 1 option after the ?-mark sign work: like #psql postgresql://myuser@myserver/mydb?connect_timeout=10 or #psql postgresql://myuser@myserver/mydb?target_session_attrs=any * but if you put more than 1 option, then it doesn't?: #psql

Re: How To: A large [2D] matrix, 100,000+ rows/columns

2023-06-09 Thread Wim Bertels
Joe Conway schreef op vr 09-06-2023 om 09:16 [-0400]: > On 6/8/23 22:17, Pat Trainor wrote: > > I need to have a very large matrix to maintain & query, and if not > > (1,600 column limit), then how could such data be broken down to > > work? > >   100,000 rows * >   100,000 columns * >   8 bytes

Re: nested xml/json to table

2023-03-17 Thread Wim Bertels
Thomas Kellerer schreef op vr 17-03-2023 om 11:21 [+0100]: > Wim Bertels schrieb am 17.03.2023 um 11:05: > > what would be the general idea: "easily" convert an hierarchical > > structure like json or xml to a table; for example creating columns > > by > > app

nested xml/json to table

2023-03-17 Thread Wim Bertels
Hello, in python pandas there is for example a json_normalize function, i didn't find something similar or better in postgresql? what would be the general idea: "easily" convert an hierarchical structure like json or xml to a table; for example creating columns by appending the key-names when

Re: Best Open Source OS for Postgresql

2023-02-01 Thread Wim Bertels
Hello Giovanni, it depends, do you know a truly open source os without proprietary blobs for firmware or device drivers? Debian used to try to make a clear separation in this with 'main' being the default section when installing, unfortunately this practically no longer applies to proprietary

Re: Creating constraint dynamically

2022-08-22 Thread Wim Bertels
sivapostg...@yahoo.com schreef op ma 22-08-2022 om 07:29 [+]: > > ALTER TABLE public.tx_barcode_stock  > ADD CONSTRAINT "tx_barcode_stock_CK1" CHECK  > ( (branchcode = '1'::bpchar  and barcodeitem = 'Y'::bpchar and > closingstock >= 0::numeric)  Or (branchcode = '1' and barcodeitem = >

Re: Can I get the number of results plus the results with a single query?

2022-08-22 Thread Wim Bertels
Perry Smith schreef op ma 15-08-2022 om 08:49 [-0500]: > I like to have what I call “baby sitting” messages such as “Completed > 15 out of 1023”.  To do this, I need the number of results a query > returns but I also need the results. > > Currently I’m doing this with two queries such as: > >    

Re: \set \e and newline

2022-02-28 Thread Wim Bertels
Laurenz Albe schreef op vr 25-02-2022 om 10:33 [+0100]: > On Thu, 2022-02-24 at 18:16 +0100, Wim Bertels wrote: > This was interpreted as if you had entered it in a single line: > > \set x 1 select :x > > So "x" is now "1select1;". yes >

\set \e and newline

2022-02-24 Thread Wim Bertels
Hello, a quick question about https://www.postgresql.org/docs/current/app-psql.html and the \set option it seems that \set does not interpret an 'enter' interactively the same as an 'enter' in a short script made with \e ### * case 1: postgres=# \set x 1 postgres=# select :x; ?column?

Re: Pgcrypto extension - decrypt(encrypt(... not returning original data?

2021-12-01 Thread Wim Bertels
hex 2 ascii SQL Padawan schreef op wo 01-12-2021 om 18:37 [+]: > \x6461 -- mvg, Wim Bertels -- https://coronalert.be Lector UC Leuven-Limburg -- Truth is the most valuable thing we have -- so let us economize it. -- Mark Twain

Re: The tragedy of SQL

2021-09-14 Thread Wim Bertels
Is it possible that this is mainly an emotional discussion? Raymond Brinzer schreef op di 14-09-2021 om 02:39 [-0400]: > Many languages are awesome. I'm always astonished at what great > things people have come up with, over the years; it's been a > wonderfully fertile field. We would certainly

curious cost vs execution time (local test)

2021-03-09 Thread Wim Bertels
ws=3 width=4) (actual time=0.001..0.003 rows=7 loops=3503) Index Cond: ("AlbumId" = "Album"."AlbumId") Filter: ("Milliseconds" < t."Milliseconds") Rows Removed by Filter:

Re: Import data from one instance another

2021-03-09 Thread Wim Bertels
one table > name called sports I want to import data from A into B instances I > found foreign data wrapper is the best solution when the table is > huge here I have doubt is it foreign data wrapper and foreign tables > are same? > > > Thanks > > Rama Krishnan -- mvg,

Re: psql > split > queries & output

2020-12-04 Thread Wim Bertels
Daniel Verite schreef op do 03-12-2020 om 16:32 [+0100]: > Wim Bertels wrote: > > > but interactively this doesn't seem to work > > Interactively something like this might do the job: > > $ PSQL_HISTORY=/tmp/queries.txt psql -L /tmp/logfile.txt > &

Re: psql > split > queries & output

2020-12-03 Thread Wim Bertels
Daniel Verite schreef op do 03-12-2020 om 15:18 [+0100]: > Wim Bertels wrote: > > > * one pipe (or..) to a file which only contains the statements > > (queries) history (and not the output) > > * another pipe (or..) to a file which only contains the output

psql > split > queries & output

2020-12-03 Thread Wim Bertels
Hello, psql shows (the queries and) the output, there are for example the -L option and echo_queries option is there a way to run psql so that: * inside psql there are no surprises :) (ignore this line:) * one pipe (or..) to a file which only contains the statements (queries) history (and not

Re: SSL between Primary and Seconday PostgreSQL DBs

2020-09-03 Thread Wim Bertels
First thougt: A general solution that you could use is wireshark. For example : Search for wireshark ssl traffic Susan Joseph schreef op September 3, 2020 10:54:36 AM UTC: >OK, I understand I was just hoping someone could confirm that my >settings are correct.  >I didn't come across an error

Re: Capturing just slow queries

2020-07-17 Thread Wim Bertels
elect > statements. > > Thanks. > > Tiff -- mvg, Wim Bertels -- Lector UC Leuven-Limburg -- There is no hunting like the hunting of man, and those who have hunted armed men long enough and liked it, never care for anything else thereafter. -- Ernest Hemingway

Re: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?

2020-03-30 Thread Wim Bertels
ps%3A%2F%2Fwww.scribd.com%2Fuser%2F270125049%2FTeo-En-Mingdata=02%7C01%7Cwim.bertels%40ucll.be%7Cb58a22dd7cca44dbff4f08d7d4a8c9d5%7Ce638861b15d94de6a65db48789ae1f08%7C0%7C0%7C637211694717781909sdata=Ug%2BqnOPc5bB4g1LrECXLIz8EOUKlvdDXF10%2BcUTfxTI%3Dreserved=0 > > -END EMAIL SIGNATURE

Re: Conditional return of aggregated data

2019-12-02 Thread Wim Bertels
idence) as > aggstat,statcount,short_name_en from stats_residence where > aggstat>some_number; > > But as I soon discovered that's not valid syntax! Hence ideas welcome > from those smarter than me. > > Thanks ! > > Laura > > -- mvg, Wim Ber

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Wim Bertels
lease don't hesitate to ask me. > > Tia and rgs, > > Pól... > > -- mvg, Wim Bertels -- Lector UC Leuven-Limburg -- The human race has one really effective weapon, and that is laughter. -- Mark Twain

Re: Case Insensitive Comparison with Postgres 12

2019-10-09 Thread Wim Bertels
Using the datatype citext might be an alternative solution Igal Sapir schreef op October 8, 2019 10:51:52 PM UTC: >I am trying to test a simple case insensitive comparison. Most likely >the >collation that I chose is wrong, but I'm not sure how to choose the >correct >one (for English/US?).

Re: RowDescription message

2019-10-07 Thread Wim Bertels
Or CREATE TABLE t(); SELECT * FROM t; Van: Tatsuo Ishii Verzonden: maandag 7 oktober 2019 10:00 Aan: pgsql-gene...@postgresql.org Onderwerp: RowDescription message According to the manualof RowDescription message

Re: Camel case identifiers and folding

2019-03-15 Thread Wim Bertels
Steve Haresnape schreef op vr 15-03-2019 om 12:06 [+1300]: > I'm porting a sql server database to postgresql 9.6. My camelCase > identifiers are having their humps removed. This is disconcerting and > sad. the SQL ISO defines exactly this behaviour (as you note), so this is be expected