tencent cloud

TencentDB for PostgreSQL

Release Notes and Announcements
Release Notes
Product Announcements
Product Introduction
Overview
Features
Strengths
Scenarios
Information Security
Regions and AZs
Product Feature List
Large version lifecycle description
MSSQL Compatible Version
Billing
Billing Overview
Instance Type and Specification
Purchase Methods
Refund
Overdue Payments
Backup Space Billing
Database Audit Billing Overview
Getting Started
Creating TencentDB for PostgreSQL Instance
Connecting to TencentDB for PostgreSQL Instance
Managing TencentDB for PostgreSQL Instance
Importing Data
Migrating Data with DTS
Kernel Version Introduction
Kernel Version Overview
Kernel Version Release Notes
Viewing Kernel Version
Proprietary Kernel Features
Database Audit
Audit Service Description
Activating Audit Service
View Audit Logs
Modify audit services
Audit Performance Description
User Guide
Instance Management
Upgrading Instance
CPU Elastic Scaling
Read-Only Instance
Account Management
Database Management
Parameter Management
Log Management and Analysis
Backup and Restoration
Data Migration
Extension Management
Network Management
Access Management
Data Security
Tenant and Resource Isolation
Security Groups
Monitoring and Alarms
Tag
AI Practice
Using the Tencentdb_ai Plug-In to Call Large Models
Building Ai Applications with the Tencentdb Ai Plug-In
Combining Supabase to Quickly Build Backend Service Based on TencentDB for PostgreSQL
Use Cases
postgres_fdw Extension for Cross-database Access
Automatically Creating Partition in PostgreSQL
Searching in High Numbers of Tags Based on pg_roaringbitmap
Querying People Nearby with One SQL Statement
Configuring TencentDB for PostgreSQL as GitLab's External Data Source
Supporting Tiered Storage Based on cos_fdw Extension
Implement Read/Write Separation via pgpool
Implementing Slow SQL Analysis Using the Auto_explain Plugin
Using pglogical for Logical Replication
Using Debezium to Collect PostgreSQL Data
Set Up a Remote Disaster Recovery Environment for PostgreSQL Locally on CVM
Read-Only Instance and Read-Only Group Practical Tutorial
How to Use SCF for Scheduled Database Operations
Fix Table Bloat
Performance White Paper
Test Methods
Test Results
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Read-Only Instance APIs
Backup and Recovery APIs
Parameter Management APIs
Security Group APIs
Performance Optimization APIs
Account APIs
Specification APIs
Network APIs
Data Types
Error Codes
FAQs
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Structural Compatibility Check

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-04-30 17:58:55

Check Detail

If the target database version is 12 or higher, and the table to be migrated contains data types abstime, reltime and tinterval, the verification task will report an error.
<data types abstime, reltime and tinterval are some older date and time types which have been deprecated in new PostgreSQL Versions. It is recommend using following types as alternatives:
abstime: Can be substituted with timestamp or timestamp with time zone types. These types provide a broader range of date and time representation capabilities.
reltime: Can be substituted with interval type. interval type is used to represent time intervals and can include units such as year, month, day, hour, minute, and second.
tinterval: Can be substituted with tsrange or tstzrange types. These types are used to represent time ranges and can include start time and end time.

Remediation Method

The modification methods for the three data types abstime, reltime and tinterval are similar. First, create a new column. Convert the old data format to the new data format and store it in the new column. After verifying that the data in the new column is correct, delete the old column. Finally, rename the new column to the name of the old column as needed.
The following takes modifying abstime to timestamp as an example for introduction.
1. In the table where the verification task prompts an error, add a new timestamp column.
ALTER TABLE your_table ADD COLUMN new_column TIMESTAMP;
2. Convert the data in the abstime column to the timestamp type and store the result in a new column.
UPDATE your_table SET new_column = your_abstime_column::TIMESTAMP;
3. Verify if data in the new column is correct.
SELECT * FROM your_table;
4. If you confirm that the data in the new column is correct, you can delete the old abstime column.
ALTER TABLE your_table DROP COLUMN your_abstime_column;
5. If necessary, you can rename the new column to the name of the old column.
ALTER TABLE your_table RENAME COLUMN new_column TO your_abstime_column;

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan