Data Table Object Reference variable in C++
Is there a function in bigquery to infer the data type of a column?
I doubt it. Inferring a column schema would require looking at the entire data set this would effectively double import times
More on reddit.comKnex: modifying a column
Create a new migration, and use the alterTable and alter methods: https://knexjs.org/#Schema-alter
Rationale behind array data type in PostgreSQL
I love Postgres arrays. One use case I had is to store machine learning model weights which were a 2d array of numbers.
Another use case (from long ago) was to store lists of 'tags' which were just string arrays. Sure, I could have got all relational by creating a tags table and referencing them through a many-to-many join table but that would have made queries harder and impacted performance.
You typically shouldn't be using them to store data where you need integrity to be maintained to foreign relations (for that, foreign keys are still the way to go) unless there's a good reason to de-normalise them that way (e.g. a list of text tags.
More on reddit.com