You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A % in a table or attribute comment fails to declare; %% is stored as % #1789
A % in a table or attribute comment makes the table fail to declare, on both backends. A %% declares, but is stored as a single %. The declared DDL goes through the driver's parameter formatting even though no parameters are passed, so % is read as a format placeholder.
@schemaclassT(dj.Manual):
definition=""" # table 50% done x : int32 # col 50% done """
MySQL (PyMySQL): ProgrammingError: not enough arguments for format string
PostgreSQL (psycopg2): IndexError: tuple index out of range
With literal %% kept in both comments, the table declares, and both comments read back as literal % kept.
Expected
Comments containing % declare and are stored as written. For example, % could be escaped where the DDL is built, or DDL could be sent without parameter formatting.
Activity