derkan / pg_party Goto Github PK
View Code? Open in Web Editor NEWAutomatic partitioning on date-timestamp columns for PostgreSQL v9.1+
Automatic partitioning on date-timestamp columns for PostgreSQL v9.1+
Hi Derkan,
need urgent help for migrating non partition table to partition table. this table as 1 year old data .
I created a new table but for coping data from old to new table, it needs partitions for past 1 year. Can u help me to create older partitions using script in single shot ?
any chance these line 146-165 & 166-184 are not duplicate?
-- Create non constraint indexes as just like parent table
FOR tmp_sql, idx_name IN
SELECT
pg_get_indexdef(i.oid),
i.relname
FROM pg_index x
JOIN pg_class c ON c.oid = x.indrelid
JOIN pg_class i ON i.oid = x.indexrelid
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_tablespace t ON t.oid = i.reltablespace
WHERE NOT x.indisunique
AND n.nspname = schema_name
AND c.relname = master_table
LOOP
tmp_sql := replace(tmp_sql, 'CREATE INDEX ' || idx_name || ' ON ' || schema_name || '.' || master_table,
'CREATE INDEX IF NOT EXISTS ' || idx_name || '_' || part_val || ' ON ' || schema_name || '.' ||
part_name);
EXECUTE tmp_sql;
END LOOP;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.