Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Guyren Howe
I get all this. Give me a couple million bucks, and I’ll hire some of the Postgres devs to build a new database. We could crib some of the low-level code from Postgres, but everything above the low level would need to be rewritten. I was proposing more that we at least provide higher-level, more

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Tom Lane
Raymond Brinzer writes: > Will it be accepted here? I don't know; I'm not an insider, or in a > position to say. But it'd be a much better pitch than a pep talk, or > speaking in generalities about SQL. And that's coming from someone who > actually agrees with you. I'm 100% on board with the i

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Raymond Brinzer
On Fri, Feb 11, 2022 at 12:26 AM Guyren Howe wrote: > I’m not proposing some crackpot half-baked idea here. There are > well-defined and researched alternatives to SQL. > I didn't suggest that you were. Anything which was written, someone had to actually write. > The most fully-developed you-

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread David G. Johnston
On Thursday, February 10, 2022, Guyren Howe wrote: > On Feb 10, 2022, at 17:06 , Mladen Gogala wrote: > > > But SQL is a terrible, no good, very bad language. > > > I cannot accept such a religious persecution of SQL without a detailed > explanation. > > > I feel like anyone who is defending SQL

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Guyren Howe
I’m not proposing some crackpot half-baked idea here. There are well-defined and researched alternatives to SQL. The most fully-developed you-can-use-today offering is Datomic, which uses Datalog as its query language. If you know Prolog, and how that is kind of database-like, Datomic is pretty

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Raymond Brinzer
On Thu, Feb 10, 2022 at 11:56 PM Guyren Howe wrote: > I feel like anyone who is defending SQL here isn’t aware of how much > better the alternatives are, and how bad SQL really is. > Have you written a language description we can read and talk about? -- Ray Brinzer

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Guyren Howe
On Feb 10, 2022, at 17:06 , Mladen Gogala wrote: > >> But SQL is a terrible, no good, very bad language. > > I cannot accept such a religious persecution of SQL without a detailed > explanation. > I feel like anyone who is defending SQL here isn’t aware of how much better the alternatives ar

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Raymond Brinzer
On Thu, Feb 10, 2022 at 5:51 PM Guyren Howe wrote: > When you dig into it, the powerful idea here is the relational algebra, > and its equivalence to a first-orderish logic. > > I put up with SQL so I can use relations, and I love Postgres because it > has the least bad SQL (by a mile!) > > But S

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Ron
On 2/10/22 4:51 PM, Guyren Howe wrote: [snip] I don’t really understand why folks who love the relational model aren’t perpetually up in arms about SQL being their only option. Much better query languages are known and well studied. Because it's Good Enough, and everyone with the wisdom of age

Re: How to determine whether I'm running on a standby?

2022-02-10 Thread Ron
On 2/10/22 1:56 PM, David G. Johnston wrote: On Thu, Feb 10, 2022 at 12:54 PM Mladen Gogala > wrote: The procedure works fine on the primary but reports a bunch of errors on the read-only standbys. A standby is in perpetual recovery mode. (Just like in

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Mladen Gogala
Please, don't top-post. On 2/10/22 17:51, Guyren Howe wrote: When you dig into it, the powerful idea here is the relational algebra, and its equivalence to a first-orderish logic. I put up with SQL so I can use relations, and I love Postgres because it has the least bad SQL (by a mile!) As

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread David G. Johnston
On Thu, Feb 10, 2022 at 3:51 PM Guyren Howe wrote: > But SQL is a terrible, no good, very bad language. > No, it's not. It is also not perfect. I don’t really understand why folks who love the relational model aren’t > perpetually up in arms about SQL being their only option. Much better query

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Guyren Howe
When you dig into it, the powerful idea here is the relational algebra, and its equivalence to a first-orderish logic. I put up with SQL so I can use relations, and I love Postgres because it has the least bad SQL (by a mile!) But SQL is a terrible, no good, very bad language. I don’t really u

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Benedict Holland
This is a strange post. Why is SQL bad and how do your reconcile that with managing 99%+ of all data? It's so bad that we have systems that plug into sql to query data outside of tables like Athena or Excel. Why are you not using pgadmin4? Yes. Psql as a command line isn't great for humans. It's s

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Bruce Momjian
On Thu, Feb 10, 2022 at 06:25:45PM +0100, Peter J. Holzer wrote: > On 2022-02-10 18:22:29 +0100, Peter J. Holzer wrote: > > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > > • SELECT * - b.a_id from a natural join b > > > □ let me describe a select list by removing fields from a relati

Re: How to determine whether I'm running on a standby?

2022-02-10 Thread David G. Johnston
On Thu, Feb 10, 2022 at 12:54 PM Mladen Gogala wrote: > The procedure works fine on the primary but reports a bunch of errors on > the read-only standbys. > A standby is in perpetual recovery mode. There is a function that returns a boolean true if you are in recovery. https://www.postgresql.org

How to determine whether I'm running on a standby?

2022-02-10 Thread Mladen Gogala
Hi! I am running PostgreSQL 13.5, one primary cluster and two standby clusters, managed by PgBouncer which will automatically promote one of the  standbys to the primary in case of failure. I have a job that is cleaning "old data",  with "old data" being whatever business side of the company

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Guyren Howe
I’d like to point out that sum types would be great. (Sum types let you have any of two or more different types in one value) For example, I could work around the issues with NULL by defining an enumeration type with values like MISSING, UNKNOWN, INVALID, … and then I can have a column that is

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Merlin Moncure
On Thu, Feb 10, 2022 at 10:54 AM Merlin Moncure wrote: > On Wed, Feb 9, 2022 at 11:15 PM Guyren Howe wrote: > >> >> > >>- *Also nested function definitions, so top-level functions can be >> built out of local auxiliary functions.* >>- *Other languages* >> - *Tutorial D, Datal

Re: [EXT] Re: Passing XML column in an array

2022-02-10 Thread Garfield Lewis
>The most obvious theory is that there are some nulls in the XT.XMLT1C1 >column. Since your code isn't bothering to check pXmlDataNulls[ix], >it would hit a null-pointer dereference when accessing pXmlData[ix]. > > regards, tom lane Thx, Tom... my bad... Regard

Re: Passing XML column in an array

2022-02-10 Thread Tom Lane
Garfield Lewis writes: > I am trying to pass an array into a new function I am creating called > lzxmlexists via the following statement: > wdbs=# SELECT "XT"."ROWKEY" , "XT"."XMLT1C1" FROM "LZQAAS"."T642_XML_T1" "XT" > WHERE "ROWKEY"=64201 AND lzxmlexists( ' $XTX//DeptName[ . = $Dn]', > '

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
On 2022-02-10 10:13:16 +0100, Karsten Hilbert wrote: > Am Wed, Feb 09, 2022 at 09:14:39PM -0800 schrieb Guyren Howe: > > There are huge developer benefits available to focusing > > more on making a great relational programming environment, > > well outside the SQL standard. > > There's a seemingly

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
On 2022-02-10 18:22:29 +0100, Peter J. Holzer wrote: > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > • SELECT * - b.a_id from a natural join b > > □ let me describe a select list by removing fields from a relation. In > > the example, I get all fields in the join of a and b

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > Postgres has since the outset gone beyond the SQL standard in many ways : > types, inheritance, programmability, generality are all well beyond what SQL > used to mandate and still well beyond the current standard. > > There are huge developer ben

Passing XML column in an array

2022-02-10 Thread Garfield Lewis
Hi All, I have the following code: 141 if ( 0 != iXmlArrDim ) { 142 Datum*pXmlData = NULL; 143 bool *pXmlDataNulls = NULL; 144 uint32_t iXmlCount = 0; 145 bool bFirstTime= true; 146 147 Assert( XMLOID == ARR_ELEMENTS( p

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Merlin Moncure
On Wed, Feb 9, 2022 at 11:15 PM Guyren Howe wrote: > Postgres has since the outset gone beyond the SQL standard in many ways : > types, inheritance, programmability, generality are all well beyond what > SQL used to mandate and still well beyond the current standard. > > There are huge developer

Re: Network Card Not Listening at Startup

2022-02-10 Thread Ludwig Isaac Lim
> On Thursday, February 10, 2022, 01:49:10 AM GMT+8, Tom Lane > wrote: >> Ludwig Isaac Lim writes: >> How do make sure that NIC will be listening every time I started/restarted >> the server? > You need to tell systemd not to start the postgresql service > until the network is up.

Invalid operation order while producing DB dump

2022-02-10 Thread Sergey Belyashov
Hi, I have tried to upgrade my cluster from version 13 to 14 using the command: "pg_upgradecluster -m links --no-start 13 main". But upgrade failed with messages: - pg_restore: creating INDEX "public.closed_sessions_closed_id_idx" pg_restore: while processing header: pg_restore: fro

Re: Proposed German Translation of Code of Conduct Policy

2022-02-10 Thread Karsten Hilbert
Am Thu, Feb 10, 2022 at 03:24:54PM +0500 schrieb Umair Shahid: > > What happens if all members of the committee are impeached at once ? > > > > That is one reason to strive for diversity in the CoC Committee - the > chances of this happening are reduced to near-zero. It may be near-zero for impea

Re: Proposed German Translation of Code of Conduct Policy

2022-02-10 Thread Umair Shahid
Hi Karsten On Tue, Jan 25, 2022 at 4:48 AM Karsten Hilbert wrote: > Ein Vorschlag: > > > Inklusivität und angemessenes Verhalten > > > > Das PostgreSQL-Projekt steht jedem offen, der Interesse an > > der Arbeit mit PostgreSQL hat, unabhängig von seinem > > Erfahrungsstand mit der Software oder m

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Karsten Hilbert
Am Wed, Feb 09, 2022 at 09:14:39PM -0800 schrieb Guyren Howe: > There are huge developer benefits available to focusing > more on making a great relational programming environment, > well outside the SQL standard. There's a seemingly small but conceptually rather significant difference between go

Re: DELETING then INSERTING record with same PK in the same TRANSACTION

2022-02-10 Thread Andrew Hardy
As requested here is a full script and the issue does not arise. My sincere apologies it appears the issue is most likely with my client programming code. My first ever post here. I shall definitely be providing a full working SQL script from the very start on any future post. Many thanks and apo