postgrespro / pg_pathman

Partitioning tool for PostgreSQL
Other
586 stars 68 forks source link

create range partions get error #209

Open nathan-zhu opened 5 years ago

nathan-zhu commented 5 years ago

Problem description

select create_range_partitions('part_test'::regclass, 'crt_time', '2016-10-25 00:00:00'::timestamp without time zone, interval '1 year', 24, false);

get error during create range partitions.


ERROR:  function create_range_partitions(regclass, unknown, timestamp without time zone, interval, integer, boolean) does not exist
LINE 2: create_range_partitions('part_test'::regclass, 'crt_time', '...
        ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Environment

postgres 9.5 ubuntu18.04


mydb=# \dx
                     List of installed extensions
    Name    | Version |   Schema   |           Description
------------+---------+------------+----------------------------------
 pg_pathman | 1.5     | public     | Partitioning tool for PostgreSQL
 plpgsql    | 1.0     | pg_catalog | PL/pgSQL procedural language
Table "public.part_test"
  Column  |            Type             | Modifiers | Storage  | Stats target | Description
----------+-----------------------------+-----------+----------+--------------+-------------
 id       | integer                     | not null  | plain    |              |
 info     | text                        |           | extended |              |
 crt_time | timestamp without time zone | not null  | plain    |              |
arssher commented 4 years ago

This is weird.

CREATE EXTENSION pg_pathman;

create table part_test(id int, info text, crt_time timestamp without time zone not null);
select create_range_partitions('part_test'::regclass, 'crt_time', '2016-10-25 00:00:00'::timestamp without time zone, interval '1 year', 24, false);

works for me on 9.5. Probably you have wrong search_path?