Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to write a statement when changing the length of an integer field in a table?
How to write a statement when changing the length of an integer field in a table?
For fields of character type and character variation type, you can also use the following statements to query.

choose

Attname is name, typname is type, and atttypmod-4 is size.

from

Pg_class is a.

The left outer connection pg_attribute is b ON (b.attrelid = a.oid).

The left external connection pg_type is c ON(b. atttype id = c. oid).

Where a.rel name ='< tablename & gt' attname ='< field name & gt'

And b.attstattarget =-1

Sort by attnum;

I hope it helps you.

In addition, the product group purchase on the virtual machine group is super cheap.