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

3

8

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?

Bellwether answered 13/7, 2012 at 15:44 Comment(0)
A
3

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

Aliphatic answered 16/7, 2012 at 15:16 Comment(2)
Ok thx , but this is not the answer !! <br/> or at least this is not what i want . <br/> What i was looking for is the export_objects() function<br/><code> select export_objects('','object_name')<code/> this way you will get the creation script for the object.Bellwether
Glad you got to what you needed!Aliphatic
B
13

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.

Bellwether answered 18/7, 2012 at 19:56 Comment(0)
A
3

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

Aliphatic answered 16/7, 2012 at 15:16 Comment(2)
Ok thx , but this is not the answer !! <br/> or at least this is not what i want . <br/> What i was looking for is the export_objects() function<br/><code> select export_objects('','object_name')<code/> this way you will get the creation script for the object.Bellwether
Glad you got to what you needed!Aliphatic
K
0

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.

Kathleenkathlene answered 26/12, 2012 at 21:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.