Re: PostgreSQL vs MariaDB

2023-03-24 Thread Ron
What RDBMS is your data currently on? On 3/25/23 01:15, Inzamam Shafiq wrote: Hi Ben, We have a complex running, and we will be having a lot of Insert, update and deletes. We have many partitioned tables with huge data and some complex SQL is written at the application logic, some analytical

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Inzamam Shafiq
Hi Ben, We have a complex running, and we will be having a lot of Insert, update and deletes. We have many partitioned tables with huge data and some complex SQL is written at the application logic, some analytical functions, union/intersect etc. clauses and also we have materialized views used

Re: psql \copy with multi-line query

2023-03-24 Thread Rob Sargent
On 3/24/23 17:14, David G. Johnston wrote: On Fri, Mar 24, 2023 at 4:04 PM Rob Sargent wrote: Using version 13 psql on version 14 server and having trouble sending a multi-line select in the \copy.  I don't see any remark about this in the man page. The copy meta-command cannot co

Re: psql \copy with multi-line query

2023-03-24 Thread David G. Johnston
On Fri, Mar 24, 2023 at 4:04 PM Rob Sargent wrote: > Using version 13 psql on version 14 server and having trouble sending a > multi-line select in the \copy. I don't see any remark about this in the > man page. > The copy meta-command cannot contain newlines. You should use "COPY ... TO STDOU

psql \copy with multi-line query

2023-03-24 Thread Rob Sargent
Using version 13 psql on version 14 server and having trouble sending a multi-line select in the \copy.  I don't see any remark about this in the man page. \copy ( select a.mrn, a.relationship,a.relation_mrn,a.provided_relationship from actual_and_inf_rel_part1_unique_clean a join family_ids f

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Miles Elam
On Fri, Mar 24, 2023 at 4:07 AM Inzamam Shafiq wrote: > > Can someone please list pros and cons of MariaDB vs PostgreSQL that actually > needs serious consideration while choosing the right database for large OLTP > DBs (Terabytes)? Think about what you want/need from the database for your proj

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Adrian Klaver
On 3/24/23 9:44 AM, Dominique Devienne wrote: On Fri, Mar 24, 2023 at 5:40 PM Adrian Klaver > wrote: On 3/24/23 03:28, Dominique Devienne wrote: > On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver mailto:adrian.kla...@aklaver.com> >

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Dominique Devienne
On Fri, Mar 24, 2023 at 5:40 PM Adrian Klaver wrote: > On 3/24/23 03:28, Dominique Devienne wrote: > > On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver > > wrote: > Your original question was: > > "But I'm wondering about getting 1 row per constraint instead, > and

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Adrian Klaver
On 3/24/23 03:28, Dominique Devienne wrote: On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver > wrote: On 3/23/23 04:12, Dominique Devienne wrote: > CROSS JOIN LATERAL UNNEST(cnstr.conkey) WITH ORDINALITY AS cols(value, rank) >   ORDER BY cols.rank

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Thomas Kellerer
Inzamam Shafiq schrieb am 24.03.2023 um 12:07: Can someone please list pros and cons of MariaDB vs PostgreSQL that actually needs serious consideration while choosing the right database for large OLTP DBs (Terabytes)? As others have pointed out, this is really hard to quantify. For large datab

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Sumit Sengupta
Here is an EDB presentation on this from 2019 https://www.enterprisedb.com/blog/postgresql-vs-mysql-360-degree-comparison-syntax-performance-scalability-and-features PostgreSQL vs. MySQL: A 360-degree Comparison [Syntax, Performance, Scalability and Features]

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Dominique Devienne
On Fri, Mar 24, 2023 at 3:50 PM Jeffrey Walton wrote: > On Fri, Mar 24, 2023 at 7:07 AM Inzamam Shafiq > > Can someone please list pros and cons of MariaDB vs PostgreSQL [...] > > > > [...] MySQL has over [1700 CVEs going back to 1999.][1] > In contrast, PostgreSQL has about [240 CVEs going back

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Jeffrey Walton
On Fri, Mar 24, 2023 at 7:07 AM Inzamam Shafiq wrote: > > Can someone please list pros and cons of MariaDB vs PostgreSQL that actually > needs serious consideration while choosing the right database for large OLTP > DBs (Terabytes)? > For me, security is important. I don't want to do a lot of l

Re: PostgreSQL vs MariaDB

2023-03-24 Thread Ben Chobot
Inzamam Shafiq wrote on 3/24/23 4:07 AM: Hi Team, Hope you are doing well. Can someone please list pros and cons of MariaDB vs PostgreSQL that actually needs serious consideration while choosing the right database for large OLTP DBs (Terabytes)? That's a very broad question, which will take

Re: Oracle to PostgreSQL Migration

2023-03-24 Thread Christophe Pettus
> We have an Oracle DB which is around 1TB and we want to migrate to > PostgreSQL that have a new table structure, so we want to perform > data transformation and real time CDC from Oracle to PostgreSQL. Do > we have any good open source tool to achieve this with No Coding > involved.?? To meet al

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Dominique Devienne
On Fri, Mar 24, 2023 at 11:51 AM Alvaro Herrera wrote: > On 2023-Mar-23, Dominique Devienne wrote: > > But I'm wondering about getting 1 row per constraint instead, > > and fetching an array of column names. > > IIRC you can use array_agg(unnest ORDER BY ordinality), grouping by > constraint OID

PostgreSQL vs MariaDB

2023-03-24 Thread Inzamam Shafiq
Hi Team, Hope you are doing well. Can someone please list pros and cons of MariaDB vs PostgreSQL that actually needs serious consideration while choosing the right database for large OLTP DBs (Terabytes)? Thanks. Regards, Inzamam Shafiq Sr. DBA

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Alvaro Herrera
On 2023-Mar-23, Dominique Devienne wrote: > We have a query returning 1 row per constraint column, > which until recently we didn't realize wasn't preserving order of the > columns. > > A colleague fixed that, with something like below: > > SELECT ... > FROM pg_catalog.pg_constraint cnstr > ...

Re: Convert pg_constraint.conkey array to same-order array of column names

2023-03-24 Thread Dominique Devienne
On Thu, Mar 23, 2023 at 4:20 PM Adrian Klaver wrote: > On 3/23/23 04:12, Dominique Devienne wrote: > > CROSS JOIN LATERAL UNNEST(cnstr.conkey) WITH ORDINALITY AS cols(value, > rank) > > ORDER BY cols.rank > A before coffee solution: > Thanks for answering Adrian. And sorry for the delay in res

Re: Oracle to PostgreSQL Migration

2023-03-24 Thread Inzamam Shafiq
Hi Umair, Thanks, oracle_fdw can be used, but it doesn't provide real time sync, we have to schedule jobs to insert data in actual schema from foreign tables, so some delay might be there. Regards, Inzamam Shafiq From: Umair Shahid Sent: Tuesday, March 21, 202