Friday, June 9

hdesc beta1 release

I'm pleased to introduce "halis desc" (hdesc for short) for sqlplus :)

Hdesc is a quick and simple plsql program to display information about a table in sqlplus, it aims to be an extension of the normal desc command with the same level of output as the "\d" command in PostgreSQL. I wrote it the other day and haven't done any extensive testing. Since it's a beta release i just included the basic stored procedure, no public synonyms or stuff like that.

Planed features are constraint output format cleanup, list of triggers on table, more partitioning information and possibly table statistics.

Download the code here http://halisway.hifichoice.com/hdesc.sql

Load the stored proc and example
OPS$HLINDEN@orcl> @hdesc

Procedure created.

OPS$HLINDEN@orcl> set serverout on
OPS$HLINDEN@orcl> exec hdesc('t2')
HDesc information for: t2
Column name | Data type | Nullable | Default
------------------------------ | -------------------- | -------- | ----------
T2_ID | NUMBER(5) | NO |
USER_ID | NUMBER | YES |
COST | NUMBER(4,4) | YES |
NUFF | VARCHAR2(30) | YES |
OBJECT_ID | NUMBER | YES |
------------------------------ | -------------------- | -------- | ----------
Tablespace: USERS Monitoring: YES Partitioned: NO
Last analyzed: 2006/06/08 Row movement: DISABLED Compression: DISABLE
Constraints:
Primary key T2_PK on column(s): T2_ID
Foreign key: SYS_C0096241 on (USER_ID) references T1(ID)
Foreign key: T2_NUFF_FK on (NUFF,OBJECT_ID) references CT2(OBJECT_NAME,OBJECT_ID)
Unique: T2_COST_UNIQ on (COST)

PL/SQL procedure successfully completed.

Please send any feedback you may have.

No comments: