Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

PG_ATTRIBUTE

Updated on 2024-08-20 GMT+08:00

PG_ATTRIBUTE records information about table columns.

Table 1 PG_ATTRIBUTE columns

Name

Type

Description

attrelid

oid

Table to which a column belongs.

attname

name

Column name.

atttypid

oid

Column type.

attstattarget

integer

Level of details of statistics collected for this column by ANALYZE.

  • The value 0 indicates that no statistics should be collected.
  • A negative value indicates that the system default statistic object is used.
  • The exact meaning of positive values is data type-dependent.

For scalar data types, attstattarget is both the target number of "most common values" to collect, and the target number of histogram bins to create.

attlen

smallint

Copy of typlen in 12.2.15.78 PG_TYPE of the column type.

attnum

smallint

Number of the column.

attndims

integer

Number of dimensions if the column is an array (0 in other cases).

attcacheoff

integer

This column is always set to –1 on disks. When it is loaded into a row descriptor in the memory, it may be updated to cache the offset of the columns in the row.

atttypmod

integer

Type-specific data supplied at the table creation time (for example, the maximum length of a varchar column). This column is used as the third parameter when passing to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need ATTTYPMOD.

attbyval

Boolean

Copy of typbyval in 12.2.15.78 PG_TYPE of the column type.

attstorage

"char"

Copy of typstorage in 12.2.15.78 PG_TYPE of the column type.

attalign

"char"

Copy of typalign in 12.2.15.78 PG_TYPE of the column type.

attnotnull

Boolean

A NOT NULL constraint. It is possible to change this column to enable or disable the constraint.

atthasdef

Boolean

This column has a default value, in which case there will be a corresponding entry in 12.2.15.25 PG_ATTRDEF that actually defines the value.

attisdropped

Boolean

Indicates that this column has been deleted and is no longer valid. A deleted column is still physically present in the table but is ignored by the analyzer, so it cannot be accessed through SQL.

attislocal

Boolean

Indicates that this column is locally defined in the relationship. Note that a column can be locally defined and inherited simultaneously.

attcmprmode

tinyint

Compressed modes for a specific column. The compressed mode includes:
  • 0: not compressed (ATT_CMPR_NOCOMPRESS)
  • 1: DELTA compression algorithm (ATT_CMPR_DELTA)
  • 2: dictionary compression algorithm (ATT_CMPR_DICTIONARY)
  • 3: prefix compression algorithm (ATT_CMPR_PREFIX)
  • 4: digital string compression algorithm (ATT_CMPR_NUMSTR)

attinhcount

integer

Number of direct ancestors that this column has. A column with an ancestor cannot be dropped nor renamed.

attcollation

oid

Defined collation of a column.

attacl

aclitem[]

Permissions for column-level access.

attoptions

text[]

Column attribute. Currently, the following attributes are supported:

  • n_distinct: number of distinct values of a column (excluding subtables).
  • n_distinct_inherited: number of distinct values of a column (including subtables).

attfdwoptions

text[]

Column attribute of a foreign table. Currently, dist_fdw, file_fdw, and log_fdw do not use foreign table column attributes.

attinitdefval

bytea

Stores the default value expression. ADD COLUMN in the row-store table must use this column.

attkvtype

tinyint

Specifies a key value type for a column. Types include:

0: default value (ATT_KV_UNDEFINED).

1: dimension (ATT_KV_TAG).

2: indicator (ATT_KV_FIELD).

3: time column (ATT_KV_TIMETAG).

4: hidden distribution key (ATT_KV_HIDETAG).

attidentity

"char"

Identity type of a column. Value:

'0' or '\0': The column is a non-IDENTITY column.

'a': The IDENTITY column attribute is of the ALWAYS type.

'd': The IDENTITY column attribute is of the BY DEFAULT type.

'n': The IDENTITY column attribute is of the BY DEFAULT ON NULL type.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback