[Engine-devel] Engine table comments

Yair Zaslavsky yzaslavs at redhat.com
Tue Feb 26 14:03:15 UTC 2013


I think your idea is very good. 
I also think we should have it for columns as well. 
But since we already have many columns, maybe we should have an "on going effort" from various developers on this (i.e - each developer will do that for several tables). 
Thoughts? 

----- Original Message -----

> From: "Libor Spevak" <lspevak at redhat.com>
> To: engine-devel at ovirt.org
> Sent: Tuesday, February 26, 2013 2:37:17 PM
> Subject: [Engine-devel] Engine table comments

> Hi,
> I would like to propose to create a patch assigning sql comment to
> each Engine table.
> The comments will be a part of the exported DB schema report, too.
> The terminology is not always consistent across all application
> layers, so for the newcomers it would be easier to understand the
> model.

> But, what would be general guidelines?

> I recommend to use singular form of entity name as used from end-user
> point of view (if somehow visible, of course), or just used
> frequently inside code.

> Examples:
> storage_pool ... Data center
> vds_groups ... Cluster
> but:
> vm_static ... Virtual machine configuration
> vm_dynamic ... Virtual machine runtime data
> vm_statistics ... Virtual machine statistics data
> ...
> etc.

> This command prepares a template for the patch:

> psql engine -U postgres -c "select 'COMMENT ON TABLE ' || relname ||
> ' IS ''TODO'';' sql from pg_stat_user_tables t WHERE
> schemaname='public' order by t.relname" > comments_to_do.sql

> or just I can prepare a page on the wiki with table containing table
> names and volunteers :-) can propose simple understandable comments
> for known tables.

> Is it useful?

> Thanks.

> Regards,
> Libor

> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20130226/f5d63ca9/attachment.html>


More information about the Engine-devel mailing list