0
Not a bug

default values not quoted

Rob Hill 3 years ago updated 3 years ago 3

I have created a table with columns containing default values and the generated sql does not quote the value, causing the following failure message:

ERROR: cannot use column reference in DEFAULT expression

I also tried quoting the value in the "Default Value" property but in both cases the SQL generated failed to quote the vallue.

auto_renew boolean  NOT NULL DEFAULT FALSE,
Not a bug

Hello,

This is an intended behavior. In fact, the "Default Value" property can be many things, i.e.:
- a constant, like FALSE, which indeed has to be quoted
- an expression like, nextval('sequence') which can't be quoted


Therefore we decided to not quote this property.


Hope this helps,
Adam

OK.

But why, if I quote it, are the quotes ignored?