Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Как задать партиционирование если таблица еще пустая? #275

Open
@Guzya

Description

@Guzya

Problem description

Имеются таблицы, еще пустые. На них надо задать партиционирование до заливки данных.
Но не понятно как.

Воспользовался примером в одной из задач, но ни чего не вышло.

Environment

=# create table test_1(modification_time timestamp not null);CREATE TABLE=# SELECT create_range_partitions('test_1', 'modification_time', null::date, '1 day'::interval,0); create_range_partitions -------------------------                       0(1 row)=# insert into test_1 values (now());INSERT 0 1=# insert into test_1 values (now()+'1 day'::interval);INSERT 0 1=# \d+ test_1                                                  Table "public.test_1"      Column       |            Type             | Collation | Nullable | Default | Storage | Stats target | Description -------------------+-----------------------------+-----------+----------+---------+---------+--------------+------------- modification_time | timestamp without time zone |           | not null |         | plain   |              | =# \d test_1                              Table "public.test_1"      Column       |            Type             | Collation | Nullable | Default -------------------+-----------------------------+-----------+----------+--------- modification_time | timestamp without time zone |           | not null | =# drop table test_1 ;ERROR:  cannot drop table test_1 because other objects depend on itDETAIL:  sequence test_1_seq depends on table test_1HINT:  Use DROP ... CASCADE to drop the dependent objects too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp