Up_One
Up_One

Reputation: 5271

How to see the metadata of objects in Vertica Database (desc like Oracle)

I would like to know how I can get the metadata of an object in a Vertica database; like metadata of a table. Is there any table that stores the metadata of objects (functions, views, tables) in Vertica Database.
For example in Oracle, I could type the following and get a detailed description of tables or see the code of a procedure.
oracle :> desc table_name;
or
oracle :> edit proc_name;

I know that I can see the tables from my schemas with \dt command, but is there any way I can see the DDL statements that created the objects?

Upvotes: 8

Views: 14897

Answers (3)

Up_One
Up_One

Reputation: 5271

Thanks, but this is not what I want. I was looking for is the export_objects() function:

select export_objects('','object_name') 

This way you will get the creation script for the object.

Upvotes: 13

timbaileyjones
timbaileyjones

Reputation: 67

Extra tip: If you specify only the schema, you will get all of the objects inside that schema. Sure beats having to enter a loop where you run export_objects() for every object.

Upvotes: 0

Joe
Joe

Reputation: 200

\d table-name should get you what you need.

Upvotes: 3

Related Questions