jeudi 5 mars 2015

Dropped column still has value when recreated with Postgres table of 150M rows


I need to set the column to NULL. Until now, this has worked, but for some reason, on this table which is much larger than the rest, it doesn't seem to be working:



ALTER TABLE "public"."WorkoutExercises" DROP COLUMN "_etl";
ALTER TABLE "public"."WorkoutExercises" ADD COLUMN "_etl" bool;


However



SELECT
*
FROM
"WorkoutExercises"
WHERE
"_etl" = TRUE
LIMIT 1000;


Returns 1000 results. Why is that, and how can this be fixed?





Aucun commentaire:

Enregistrer un commentaire