pg.ddx.io  pgpartman/pg_partman GitHub issues and pull requests  
help / color / mirror / Atom feed
From: vdl-dsi-architecture (@vdl-dsi-architecture) <noreply+vdl-dsi-architecture@github.com>
To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>
Subject: [pgpartman/pg_partman] issue #862: Invalid format call in partition_data_time
Date: Tue, 05 May 2026 13:57:27 +0000
Message-ID: <gh-pgpartman-pg_partman-862@github.com> (raw)

```
=>* CALL partman.partition_data_proc(
    p_parent_table := 'public.trace',
    p_interval := '6 months',
    p_wait := 0,
    p_lock_wait := 10,
    p_source_table := 'public.trace_old'
);
ERREUR:  trop peu d'arguments pour format()
CONTEXT:  affectation PL/pgSQL « v_sql := format('SELECT * FROM ONLY %I.%I WHERE %s >= %L AND %4$s < %6$L FOR UPDATE NOWAIT'
                    , v_source_schemaname
                    , v_source_tablename
                    , v_partition_expression
                    , v_min_partition_timestamp
                    , v_max_partition_timestamp) »
fonction PL/pgSQL partition_data_time(text,integer,interval,numeric,text,boolean,text,text[],boolean,boolean), ligne 264 à affectation
instruction SQL « SELECT partman.partition_data_time (p_parent_table := 'public.trace'
                                                , p_lock_wait := '10'
                                                , p_order := 'ASC'
                                                , p_analyze := false, p_batch_interval := '6 months', p_source_table := 'public.trace_old', p_ignore_infinity := 'f') »
fonction PL/pgSQL partman.partition_data_proc(text,integer,text,integer,integer,integer,text,text,text[],boolean,boolean), ligne 92 à EXECUTE
Time: 79.869 ms
```

It looks like `partition_data_time` used to have a format call with 6 arguments, one was removed, but the reference to  argument 4 and 6 was not updated:

https://github.com/pgpartman/pg_partman/blob/a12b23ee6615d179dfaa38cc6fed8ed44cd61ba2/sql/functions/...
https://github.com/pgpartman/pg_partman/blob/da0d70818d51bac92554d989a960e03335c35ab6/sql/functions/...

https://github.com/pgpartman/pg_partman/commit/1b9a24bb242a293517ad44289bbbb464f84434a0#diff-75bc84e...

view thread (4+ messages)  latest in thread

Message-ID: <gh-pgpartman-pg_partman-862@github.com>
Permalink:  ../gh-pgpartman-pg_partman-862@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox