Fix incorrect ALTER TABLE statement for columns in the instepctor.
Was caused by incorrect condition for determining the use of IDENTITY.
This commit is contained in:
parent
b3352b8496
commit
b939916b07
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ QString PgAttribute::columnDefinition(const PgDatabaseCatalog &cat) const
|
||||||
if (hasdef)
|
if (hasdef)
|
||||||
sql += " DEFAULT " % defaultValue;
|
sql += " DEFAULT " % defaultValue;
|
||||||
|
|
||||||
if (identity != ' ') {
|
if (identity != '\0') {
|
||||||
sql += " GENERATED ";
|
sql += " GENERATED ";
|
||||||
if (identity == 'a') sql += "ALWAYS";
|
if (identity == 'a') sql += "ALWAYS";
|
||||||
else if (identity == 'd') sql += "BY DEFAULT";
|
else if (identity == 'd') sql += "BY DEFAULT";
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public:
|
||||||
int32_t typmod = -1;
|
int32_t typmod = -1;
|
||||||
bool notnull = false;
|
bool notnull = false;
|
||||||
bool hasdef = false;
|
bool hasdef = false;
|
||||||
char identity = ' ';
|
char identity = '\0';
|
||||||
bool isdropped = false;
|
bool isdropped = false;
|
||||||
bool islocal = true;
|
bool islocal = true;
|
||||||
Oid collation = InvalidOid;
|
Oid collation = InvalidOid;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue