Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can’t see user-defined database “types" in pgAdmin

Is there a graphical way to create/manipulate/view special database types in PgAdmin?

For example, in PostgreSQL we have:

CREATE TYPE compfoo AS (f1 int, f2 text);

I’ve noticed pgAdmin almost shows everything graphically, such as triggers, views, functions, and of course tables, but I couldn’t find the types that I created.

like image 809
Larry Avatar asked Sep 01 '11 14:09

Larry


People also ask

What is user-defined data type in PostgreSQL?

The PostgreSQL user-defined data type is used to generate user-defined data types with the help of Create DOMAIN and CREATE TYPE. The CREATE DOMAIN command is used to generate a user-defined data type with constraints such as CHECK, NOT NULL, etc.

Where can I find pgAdmin database?

Step 1: Open the pgAdmin app and enter your password to connect to the database server. Step 2: Expand the Servers tree and then the Databases tree. The tree expands to show a list of all databases on the server. Click the Properties tab to see more information about each database.

What is create type in Postgres?

Description. CREATE TYPE registers a new data type for use in the current database. The user who defines a type becomes its owner. If a schema name is given then the type is created in the specified schema. Otherwise it is created in the current schema.


1 Answers

You just need to enable viewing types through menu File → Options... → Browser and checking Types:

enter image description here

According to pgAdmin's documentation:

The list of check boxes is used to select which object types to show in the browser tree. By default, only the most commonly used object types are shown. Reducing the number of object types shown can increase the speed of pgAdmin when querying the system catalogs. Use the Default button to reset the list to its default settings.

like image 151
Grzegorz Szpetkowski Avatar answered Oct 11 '22 11:10

Grzegorz Szpetkowski