Open reivilibre opened 5 months ago
(as an aside, the equivalent in SQLite would be to emit SQL comments in the CREATE TABLE statement, since SQLite tracks the whole SQL text of the table creation. But I'm not sure how conventional it is for people to use that.)
Motivation
When I create tables in Postgres I typically add comments to the table and the columns in order to make it easier to identify what they are for.
Currently in Sea-Query it seems this is not supported in Postgres (but might be in MySQL) and I'd have to escape to raw SQL to do this.
Proposed Solutions
I think the most natural solution would be if the
create_table
method would in some way emit the statements required in Postgres to set the comments.e.g:
would emit
after the
CREATE TABLE
statement.Especially since the Postgres syntax for this is awkward, it would make things a lot easier as well :-)
Additional Information
I think this syntax has been available in Postgres for more or less forever, so there should be no harm in supporting it.