
------=_Part_10971946_1907762502.1361957200147 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- Original Message -----
From: "Libor Spevak" <lspevak@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: engine-devel@ovirt.org Sent: Wednesday, February 27, 2013 9:36:16 AM Subject: Re: [Engine-devel] Engine table comments
Thanks for the confirmation. Appending a template for the columns :-)
psql engine -U postgres -c "SELECT 'COMMENT ON COLUMN ' || table_name || '.' || column_name || ' IS TODO;' sql FROM information_schema.columns where table_schema='public' order by table_name, column_name" > comments_columns_to_do.sql
It looks like we have cca 73 tables and 2353 columns now. So probably better to start with the tables.
i documented some (not complete) information about columns of vm_static here: http://wiki.ovirt.org/Features/Templates-3.2#Design as part of preparation for instance types feature so maybe we can use it as well
On 26.2.2013 15:03, Yair Zaslavsky wrote:
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@redhat.com>
To: engine-devel@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@ovirt.org
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
------=_Part_10971946_1907762502.1361957200147 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit <html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><br><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Libor Spevak" <lspevak@redhat.com><br><b>To: </b>"Yair Zaslavsky" <yzaslavs@redhat.com><br><b>Cc: </b>engine-devel@ovirt.org<br><b>Sent: </b>Wednesday, February 27, 2013 9:36:16 AM<br><b>Subject: </b>Re: [Engine-devel] Engine table comments<br><br> <div id="DWT335" class="moz-cite-prefix">Thanks for the confirmation. Appending a template for the columns :-)<br> <br> <i>psql engine -U postgres -c "SELECT 'COMMENT ON COLUMN ' || table_name || '.' || column_name || ' IS TODO;' sql FROM information_schema.columns where table_schema='public' order by table_name, column_name" > comments_columns_to_do.sql</i><i><br> </i><br> It looks like we have cca 73 tables and 2353 columns now. So probably better to start with the tables.<br> <br></div></blockquote>i documented some (not complete) information about columns of vm_static here:<br>http://wiki.ovirt.org/Features/Templates-3.2#Design<br>as part of preparation for instance types feature<br>so maybe we can use it as well<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div class="moz-cite-prefix"> <br> On 26.2.2013 15:03, Yair Zaslavsky wrote:<br> </div> <blockquote cite="mid:1733089166.8628739.1361887395043.JavaMail.root@redhat.com"> <style>p { margin: 0; }</style> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);">I think your idea is very good. <div>I also think we should have it for columns as well.</div> <div>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).</div> <div>Thoughts?</div> <div><br> <br> <hr id="zwchr"> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Libor Spevak" <a class="moz-txt-link-rfc2396E" href="mailto:lspevak@redhat.com" target="_blank"><lspevak@redhat.com></a><br> <b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:engine-devel@ovirt.org" target="_blank">engine-devel@ovirt.org</a><br> <b>Sent: </b>Tuesday, February 26, 2013 2:37:17 PM<br> <b>Subject: </b>[Engine-devel] Engine table comments<br> <br> Hi, <br> I would like to propose to create a patch assigning sql comment to each Engine table.<br> The comments will be a part of the exported DB schema report, too.<br> The terminology is not always consistent across all application layers, so for the newcomers it would be easier to understand the model.<br> <br> But, what would be general guidelines?<br> <br> 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.<br> <br> Examples:<br> storage_pool ... Data center<br> vds_groups ... Cluster<br> but:<br> vm_static ... Virtual machine configuration<br> vm_dynamic ... Virtual machine runtime data<br> vm_statistics ... Virtual machine statistics data<br> ...<br> etc.<br> <br> This command prepares a template for the patch:<br> <br> <i>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</i><i><br> </i><br> 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.<br> <br> Is it useful?<br> <br> Thanks.<br> <br> Regards,<br> Libor<br> <br> _______________________________________________<br> Engine-devel mailing list<br> <a class="moz-txt-link-abbreviated" href="mailto:Engine-devel@ovirt.org" target="_blank">Engine-devel@ovirt.org</a><br> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/engine-devel" target="_blank">http://lists.ovirt.org/mailman/listinfo/engine-devel</a><br> </blockquote> <br> </div> </div> </blockquote> <br> <br>_______________________________________________<br>Engine-devel mailing list<br>Engine-devel@ovirt.org<br>http://lists.ovirt.org/mailman/listinfo/engine-devel<br></blockquote><br></div></body></html> ------=_Part_10971946_1907762502.1361957200147--