I read that VALUES(expr-list) means the same as SELECT(expr-list), but
apparently not with regards to the metadata that's sent out along with
the values.

If I issue these two commands, in one case I end up with column names
"", ":1", ":2" (sequential), and in the other I end up with "1", "2",
"1000" (representational):

CREATE TABLE a AS VALUES (1,2,1000);

CREATE TABLE b AS SELECT 1,2,1000;

I'm not advocating that someone uses this table creation mechanism and
then relies on the column names, as I reckon that that's probably
unsupported, but shouldn't the two above match?

Shouldn't they also match to do whatever the SELECT already does, since
the VALUES option is probably newer and fewer people would be relying on
its behaviour already, also because an empty column name for the first
column is kind of an irregularity, even though SQLite allows commands
such as CREATE TABLE "" (""); without complaining.

Reply via email to