Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Ron
On 5/12/23 18:00, Kirk Wolak wrote: [snip] Where do we draw the lines? At other tables. Does Table DDL include all indexes? Absolutely! It should include constraints, clearly.  I would not think it should have triggers. Definitely triggers.  And foreign keys. Literally everything

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Stephen Frost
Greetings, * Kirk Wolak (wol...@gmail.com) wrote: > On Fri, May 12, 2023 at 4:37 PM Stephen Frost wrote: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > > Stephen Frost writes: > > > > Again, would be great to see someone actually work on this. There's > > > > already a good chunk of code in

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Kirk Wolak
On Fri, May 12, 2023 at 4:37 PM Stephen Frost wrote: > Greetings, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Stephen Frost writes: > > > Again, would be great to see someone actually work on this. There's > > > already a good chunk of code in core in pg_dump and in the postgres_fdw > > >

Re: Death postgres

2023-05-12 Thread Peter J. Holzer
On 2023-05-12 17:41:37 +0200, Marc Millas wrote: > On Fri, May 12, 2023 at 8:31 AM Peter J. Holzer wrote: > My guess is that the amount of parallelism is the problem. > > work_mem is a per-node limit. Even a single process can use a multiple of > work_mem if the query contains nested

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Again, would be great to see someone actually work on this. There's > > already a good chunk of code in core in pg_dump and in the postgres_fdw > > for doing exactly this and it'd be great to consolidate that and at

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Tom Lane
Stephen Frost writes: > Again, would be great to see someone actually work on this. There's > already a good chunk of code in core in pg_dump and in the postgres_fdw > for doing exactly this and it'd be great to consolidate that and at the > same time expose it via SQL. Note that this is hardly

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Stephen Frost
Greetings, * Nathaniel Sabanski (sabansk...@gmail.com) wrote: > > Perhaps a bit more discussion about what exactly the use-case is would > > be helpful- what would you use this feature for? > > App writers: To facilitate table creation and simplify schema verification, > without relying on a GUI

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Nathaniel Sabanski
> Perhaps a bit more discussion about what exactly the use-case is would > be helpful- what would you use this feature for? App writers: To facilitate table creation and simplify schema verification, without relying on a GUI tool or ORM (or system calls out to pg_dump). Tool writers: Would

Re: PG_Cron - Error Message Connection failed

2023-05-12 Thread Adrian Klaver
On 5/12/23 09:41, FOUTE K. Jaurès wrote: Understand @Adrian Klaver  . the log show: 2023-05-12 17:30:19.327 WAT [46190] LOG:  cron job 8 starting: SELECT 1 2023-05-12 17:30:19.339 WAT [46190] LOG:  cron job 8 connection failed Well that did not go anywhere.

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Nathaniel Sabanski
On Fri, 12 May 2023 at 09:12, David G. Johnston wrote: > > > On Fri, May 12, 2023, 08:35 Thorsten Glaser wrote: > >> On Fri, 12 May 2023, Nathaniel Sabanski wrote: >> >> >I believe most users would anticipate a CREATE TABLE statement that >> aligns >> >with the currently installed version- this

Re: Window function for get the last value to extend missing rows

2023-05-12 Thread Thorsten Glaser
On Fri, 12 May 2023, GF wrote: >"The SQL standard defines a RESPECT NULLS or IGNORE NULLS option for lead, >lag, first_value, last_value, and nth_value. This is not implemented in >PostgreSQL: the behavior is always the same as the standard's default, >namely RESPECT NULLS". Yeah, THAT caused no

Re: Window function for get the last value to extend missing rows

2023-05-12 Thread GF
On Fri, 12 May 2023 at 13:04, Durumdara wrote: > Dear Members! > > I have a table with temperature measures. > The data is coming from the PLC, but sometimes the period is "slipping", > so the values are not correctly minute based. > > 03:00 10 > 03:02 12 > 03:03 11 > 03:05 13 >

Re: PG_Cron - Error Message Connection failed

2023-05-12 Thread FOUTE K . Jaurès
Understand @Adrian Klaver . the log show: 2023-05-12 17:30:19.327 WAT [46190] LOG: cron job 8 starting: SELECT 1 2023-05-12 17:30:19.339 WAT [46190] LOG: cron job 8 connection failed Le ven. 12 mai 2023 à 17:23, Adrian Klaver a écrit : > On 5/12/23 09:22, FOUTE K. Jaurès wrote: > > 1) Please

Re: PG_Cron - Error Message Connection failed

2023-05-12 Thread Adrian Klaver
On 5/12/23 09:22, FOUTE K. Jaurès wrote: 1) Please do not top post. Use inline posting 2) Do not use images, copy and paste as text. hello Fabricio, the listen_addresses is set to * the result of psql command line image.png The job on pg_cron image.png What does the Postgres log show when

Re: PG_Cron - Error Message Connection failed

2023-05-12 Thread FOUTE K . Jaurès
hello Fabricio, the listen_addresses is set to * the result of psql command line [image: image.png] The job on pg_cron [image: image.png] Le ven. 12 mai 2023 à 17:05, Fabricio Pedroso Jorge a écrit : > Try checking the view cron.job, column "nodename", if it's set to > "localhost", change it

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread David G. Johnston
On Fri, May 12, 2023, 08:35 Thorsten Glaser wrote: > On Fri, 12 May 2023, Nathaniel Sabanski wrote: > > >I believe most users would anticipate a CREATE TABLE statement that aligns > >with the currently installed version- this is the practical solution for > > The currently installed version of

Re: PG_Cron - Error Message Connection failed

2023-05-12 Thread Fabricio Pedroso Jorge
Try checking the view cron.job, column "nodename", if it's set to "localhost", change it (via an UPDATE) to the address defined in "listen_address" parameter and see if this works. Em sex., 12 de mai. de 2023 às 17:00, FOUTE K. Jaurès escreveu: > Hello everyone, > > Can someone help me to

PG_Cron - Error Message Connection failed

2023-05-12 Thread FOUTE K . Jaurès
Hello everyone, Can someone help me to understand this issue. I installed and configured pg_cron on the server and I was able to connect without providing a password using psql command line. But when i schedule a job, like this: SELECT cron.schedule( 'TEST','30 seconds', $$SELECT 1$$); the result

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Thomas Kellerer
Nathaniel Sabanski schrieb am 12.05.2023 um 13:29: HN had a thread regarding the challenges faced by new users during the adoption of Postgres in 2023. One particular issue that garnered significant votes was the lack of a "SHOW CREATE TABLE" command, and seems like it would be an easy one to

Re: Death postgres

2023-05-12 Thread Marc Millas
On Fri, May 12, 2023 at 8:31 AM Peter J. Holzer wrote: > On 2023-05-11 21:27:57 +0200, Marc Millas wrote: > > the 75 lines in each tables are not NULLs but '' empty varchar, > which, > > obviously is not the same thing. > > and which perfectly generates 500 billions lines for the left join.

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Thorsten Glaser
On Fri, 12 May 2023, Nathaniel Sabanski wrote: >I believe most users would anticipate a CREATE TABLE statement that aligns >with the currently installed version- this is the practical solution for The currently installed version of what, the server or the client? bye, //mirabilos -- 15:41⎜

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Stephen Frost
Greetings, Please don't top-post on these lists. * Nathaniel Sabanski (sabansk...@gmail.com) wrote: > I believe most users would anticipate a CREATE TABLE statement that aligns > with the currently installed version- this is the practical solution for > the vast majority. Perhaps a bit more

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Nathaniel Sabanski
I believe most users would anticipate a CREATE TABLE statement that aligns with the currently installed version- this is the practical solution for the vast majority. In situations where a CREATE TABLE statement compatible with an older version of Postgres is required, users can opt for an

Re: Adding SHOW CREATE TABLE

2023-05-12 Thread Stephen Frost
Greetings, * Nathaniel Sabanski (sabansk...@gmail.com) wrote: > HN had a thread regarding the challenges faced by new users during the > adoption of Postgres in 2023. > > One particular issue that garnered significant votes was the lack of a > "SHOW CREATE TABLE" command, and seems like it would

Adding SHOW CREATE TABLE

2023-05-12 Thread Nathaniel Sabanski
HN had a thread regarding the challenges faced by new users during the adoption of Postgres in 2023. One particular issue that garnered significant votes was the lack of a "SHOW CREATE TABLE" command, and seems like it would be an easy one to implement:

Window function for get the last value to extend missing rows

2023-05-12 Thread Durumdara
Dear Members! I have a table with temperature measures. The data is coming from the PLC, but sometimes the period is "slipping", so the values are not correctly minute based. 03:00 10 03:02 12 03:03 11 03:05 13 I have to make a virtual table which is minute based. I thought I

Re: Death postgres

2023-05-12 Thread Peter J. Holzer
On 2023-05-11 21:27:57 +0200, Marc Millas wrote: > the 75 lines in each tables are not NULLs but '' empty varchar, which, > obviously is not the same thing. > and which perfectly generates 500 billions lines for the left join. > So, no planner or statistics pbs. apologies for the time wasted.