[Info-ingres] ALTER TABLE...ALTER COLUMN bug, or no?
Karl and Betty Schendel
schendel at kbcomputer.com
Thu Jan 25 13:59:01 UTC 2018
> On Jan 24, 2018, at 7:19 PM, Roy Hann <specially at processed.almost.meat> wrote:
>
> It seems that changing the size of a character column without explicitly
> specifying NOT NULL does not preserve non-nullability. This is
> seen in 10.1 and 10.2, on Windows and Solaris (at least).
>
> Keeping in mind the following passage from the SQL Guide about ALTER
> TABLE...ALTER COLUMN: "Change the size of a character column to
> preserve the existing default_clause, null_clause, column_constraint,
> and collation_name", is it a bug? And if it is a bug is it an error
> in the code or the documentation?
It's a documentation bug. The type definition that follows the ALTER
COLUMN keywords is a complete column definition; we don't try to weave
it in with whatever existed. So if you just say "varchar(10)" you get
the same thing as if you had declared the column that way, i.e.
varchar(10) with null.
Karl
More information about the Info-ingres
mailing list