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
PostgreSQL defines boolean (mostly according to SQL:1999 standard with the exception of UNKNOWN value support), but “default 1” is incorrect syntax for a boolean column; accepted are literals like “default '1'”:
xiatest=# create table test1 (a boolean default 1, b text);
ERROR: column "a" is of type boolean but default expression is of type integer
HINT: You will need to rewrite or cast the expression.
xiatest=# create table test1 (a boolean default '1', b text);
CREATE TABLE
Valid literal values for the "true" state are: TRUE, 't', 'true', 'y', 'yes', 'on', '1'.
For the "false" state, the following values can be used: FALSE, 'f', 'false', 'n', 'no', 'off', '0'.
Judging by MySQL's so-called implementation (BOOL and BOOLEAN are aliases for TINYINT) and the way this column is used in the module, an integer type should suffice. Quoting,
BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true.
…the values TRUE and FALSE are merely aliases for 1 and 0, respectively…
Reference: https://github.com/embolalia/willie/blob/master/willie/modules/rss.py#L67
PostgreSQL does not define tinyint and bool.
PostgreSQL defines boolean (mostly according to SQL:1999 standard with the exception of UNKNOWN value support), but “default 1” is incorrect syntax for a boolean column; accepted are literals like “default '1'”:
Reference: http://www.postgresql.org/docs/9.3/static/datatype-boolean.html
Judging by MySQL's so-called implementation (BOOL and BOOLEAN are aliases for TINYINT) and the way this column is used in the module, an integer type should suffice. Quoting,
Reference: http://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
Presently I'm using
which seems to work fine.
The text was updated successfully, but these errors were encountered: