Re: Column COMMENTs in CREATE TABLE?
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Column COMMENTs in CREATE TABLE? |
Дата | |
Msg-id | CAFcNs+qTtwm=CnLAi0622o04dCBd3709Ai0KoYL6gfkM6GBz0w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Column COMMENTs in CREATE TABLE? ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: Column COMMENTs in CREATE TABLE?
|
Список | pgsql-hackers |
Em sábado, 2 de julho de 2016, David G. Johnston <david.g.johnston@gmail.com> escreveu:
What I would prefer is something like this:
CREATE TABLE foo(
f1 int NOT NULL COMMENT
'the first field',
f2 int NOT NULL COMMENT
'the second field',
...
);
which would ensure the comments are both next to the field definition they're documenting and that they make it all the way to the database. I looked into the biggest products, and MySQL supports this syntax. I couldn't find any similar syntax in any other product.+1 for the idea - though restricting it to columns would not be ideal.CREATE TABLE nameCOMMENT IS'Table Comment Here'(col1 serial COMMENT IS 'Place comment here');
And what about the other CREATE statements? IMHO if we follow this path then we should add COMMENT to all CREATE statements and perhaps also to ALTER. Of course in a set of small patches to make the reviewers life easier.
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
В списке pgsql-hackers по дате отправления: