SQL ERROR subquery uses ungrouped column in PostgreSQL

2025-04-30 Thread PALAYRET Jacques
Hello, I have an unexpected error in my following query (of course, the query has been simplified here to request help): SELECT num_poste, to_char(dat, 'MM')::integer dat, CASE FLOOR((TO_NUMBER(TO_CHAR(dat,'DD'),'99')-1)/10) WHEN 0 THEN 1 WHEN 1 THEN 2 ELSE 3 END::smallint AS num_decade

Re: Interval in hours but not in days Leap second not taken into account

2023-02-27 Thread PALAYRET Jacques
zone '2022-03-26 12:00:00' ; ?column? - 3 days 01:00:00 Regards - Mail original - De: "PALAYRET Jacques" À: "Laurenz Albe" Cc: pgsql-gene...@postgresql.org Envoyé: Lundi 27 Février 2023 09:50:02 Objet: Re: Interval in hours but not in days

Re: Interval in hours but not in days Leap second not taken into account

2023-02-27 Thread PALAYRET Jacques
27;mmdd hh24:mi:ss') intervalle ; intervalle 9 days Regards - Mail original - De: "Laurenz Albe" À: "PALAYRET Jacques" , pgsql-gene...@postgresql.org Envoyé: Lundi 27 Février 2023 09:23:37 Objet: Re: Interval in hours but not in days Leap seco

Interval in hours but not in days Leap second not taken into account

2023-02-26 Thread PALAYRET Jacques
- to_timestamp('20161230 00:00:00','mmdd hh24:mi:ss') intervalle ; intervalle - 3 days 10:11:12 --> With postgreSQL, a calendar day is always 86,400 seconds long. So, is there a reason for this (interval in hours ...) ? Regards - Météo-France - PALAYRET Jacques DCSC/GDC jacques.palay...@meteo.fr Fixe : +33 561078319

Re: PostgreSQL : error hint for LATERAL join

2022-04-11 Thread PALAYRET Jacques
;) ) u(d1) ON true ; c1 | d1 | column2 +----+- a | b | a a | c | a* b | b | b b | c | b* (4 lignes) Regards De: "David G. Johnston" À: "PALAYRET Jacques" Cc: "pgsql-general" Envoyé: Vendredi 8 Avril 2022 15:36:34 Objet: Re: PostgreSQL : er

PostgreSQL : error hint for LATERAL join

2022-04-08 Thread PALAYRET Jacques
SELECT 'b', c1 ) u(d1) ON true ; c1 | d1 | c1 ++ a | b | a (1 ligne) SELECT * FROM ( SELECT 'a' ) t (c1) CROSS JOIN LATERAL ( SELECT 'b', c1 ) u(d1) ; c1 | d1 | c1 ----++---- a | b | a (1 ligne) Regards - Météo-France - PALAYRET JACQUES DCSC/GDC jacques.palay...@meteo.fr Fixe : +33 561078319

Re: PostgreSQL : bug (ou not) in CTE Common Table Expressions or Subqueries in the FROM Clause

2022-03-22 Thread PALAYRET Jacques
not possible to have a SELECT statement without a FROM clause (using DUAL table), so maybe " ambiguous " columns are not handled in the same way. Anyway, thank you very much for the explanation. Regards De: "David G. Johnston" À: "PALAYRET Jacques" Cc: "

Re: PostgreSQL : bug (ou not) in CTE Common Table Expressions or Subqueries in the FROM Clause

2022-03-22 Thread PALAYRET Jacques
nks again. Regards De: "Torsten Förtsch" À: "PALAYRET Jacques" Cc: "PostgreSQL mailing lists" Envoyé: Mardi 22 Mars 2022 11:16:19 Objet: Re: PostgreSQL : bug (ou not) in CTE Common Table Expressions or Subqueries in the FROM Clause This is what happens: WITH ele

PostgreSQL : bug (ou not) in CTE Common Table Expressions or Subqueries in the FROM Clause

2022-03-22 Thread PALAYRET Jacques
t 3 (yes according to me) ? Regards - Météo-France - PALAYRET JACQUES DCSC/GDC jacques.palay...@meteo.fr Fixe : +33 561078319

PostgreSQL : column value filtering in Logical Replication

2021-09-06 Thread PALAYRET Jacques
| 44.4 222 | 55.5 333 | 33.3 on subscriber : a | b -+-- 111 | 44.4 222 | 333 | 33.3 Regards - Météo-France - PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319

Re: Last updated time for a Schema of the table

2020-11-02 Thread PALAYRET Jacques
Hello, I don't think so, as far as I know. But, you can put in place some triggesr to do that. i.e. https://www.postgresql.org/docs/13/plpgsql-trigger.html https://wiki.postgresql.org/wiki/Audit_trigger and so on Regards De: "paras paliya" À: pgsql-gene...@postgresql.org Envoyé: Lundi

Re: split_part for the last element

2020-10-23 Thread PALAYRET Jacques
Hello, reverse(split_part(reverse('foo bar baz'), ' ', 1)) -> 'baz' Regards - Mail original - De: "Nikhil Benesch" À: pgsql-general@lists.postgresql.org Envoyé: Vendredi 23 Octobre 2020 17:47:16 Objet: split_part for the last element Hi, Suppose I need to split a string on a delim

Re: Conditional column filtering with pglogical replication

2020-10-23 Thread PALAYRET Jacques
123 | 45.6 | 15 | abc 111 | 55.5 | 66 | def on subscriber : a | b | c | d -+--++-- 123 | 45.6 | 15 | abc 111 | | 66 | def -> b NULL on subscriber but the others columns are replicated. De: "Fabrízio de Royes Mello" À: "PALAYRET Jacques"

Conditional column filtering with pglogical replication

2020-10-23 Thread PALAYRET Jacques
subscribers). For example, with a replicated table t(a integer as Primary Key, b numeric, c integer, d text), I would like to filter the column b when c between 10 and 20. Regards - Météo-France - PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319

Re: Removing Last field from CSV string

2020-05-16 Thread PALAYRET Jacques
Hello, Perhaps, a statement like : substring(theString, 1, length(theString)-position(',' IN reverse(theString))) with theString 'Class V,Class VI,Class VII,Competitive Exam,Class VIII*,Class' for example. Regards - Météo-France ----- PALAYRET JACQUES DCS

Re: Circles with circle() vs ST_Buffer() Equality equalities

2020-05-16 Thread PALAYRET Jacques
ecision))::geometry and POINT(0.998 2.5) for ST_Buffer('POINT(1 2)'::geometry, 0.5::double precision) I guess it comes from rounding because the start point is not the same for the 2 polygons. - Météo-France - PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319

Circles with circle() vs ST_Buffer() Equality equalities

2020-05-15 Thread PALAYRET Jacques
quals ; bounderingboxequals - t => Have you any explanations on the result (=false) of st_equals (NOT ordering) and bounderingequals ? Thanks in advance. Regards - Météo-France - PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319

Re: How do work tercile, percentile & funcion percentile_cont() ?

2020-04-22 Thread PALAYRET Jacques
With Libre Office Calc, same result than with PostgreSQL : =CENTILE({1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30}; 0.33) gives 10.57 (and NOT 10.5) I didn't think so. De: "PALAYRET Jacques" À: pgsql-general@lists.postgre

Re: How do work tercile, percentile & funcion percentile_cont() ?

2020-04-22 Thread PALAYRET Jacques
; percentile_cont -- 20.3 (1 ligne) De: "PALAYRET Jacques" À: pgsql-general@lists.postgresql.org Envoyé: Mercredi 22 Avril 2020 10:00:49 Objet: How do work tercile, percentile & funcion percentile_cont() ? Hello, >From a table x(c1) contain

How do work tercile, percentile & funcion percentile_cont() ?

2020-04-22 Thread PALAYRET Jacques
France - PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319

Re: One way replication in PostgreSQL

2019-06-04 Thread PALAYRET Jacques
? => What about the trigger-based replication systems like Slony or Londiste ; is it really necessary to have a connection or flow from the server S towards the server P ? Regards De: "PALAYRET Jacques" À: pgsql-general@lists.postgresql.org Envoyé: Lundi 3 Juin 2019 18:00

One way replication in PostgreSQL

2019-06-03 Thread PALAYRET Jacques
Do trigger-based replication systems (like Slony or Londiste or others) need a connection or flow from subscriber to the provider ? Thanks in advance - Météo-France ----- PALAYRET JACQUES DCSC/MBD jacques.palay...@meteo.fr Fixe : +33 561078319