When will the support of a non-effective Cartier divisor be pure of codimension 1? Let $X$ be a scheme and $D \in Div(X)$ a non-effective Cartier divisor. I am curious as to when $\text{Supp } D$ is pure of codimension 1, i.e all irreducible components are of codimension 1. So, three concrete questions that I have been having are the following: 


*

*If $X$ is assumed to be integral, what is an example of a scheme $X$ and a non-effective Cartier divisor that is not supported purely in codimension $1$?

*If $X$ is normal, can we still find non-effective Cartier divisors that are not supported purely in codimension $1$? 

*Lastly, if $X$ is not only normal, but actually regular, does this imply that the support is purely in codimension $1$?

 A: Suppose $X$ is integral and noetherian. Let $x$ be a point in the support of $D$. Then $D$ is represented by a rational function $f$ at $x$. 
If the support has codimension $\ge 2$ at $x$, then, after shrinking $X$ around $x$ if necessary, $f$ is regular and invertible outside of a closed subscheme of codimension $\ge 2$. 
(2)-(3) When $X$ is normal, this implies by Zariski's extension theorem that $f$ is regular. Its zero set is of codimension $1$ or empty by Krull's principal ideal theorem, so it must be empty. Thus $f$ is regular and invertble, and this contradicts the hypothesis that $x$ is the support of $D$. 
So when $X$ is normal, the support is empty or has pure codimension $1$. 
(1) If $X$ is not normal, the support of $D$ can have codimension $\ge 2$. It is enough to find a rational function which is regular and invertible outside of a closed subscheme of codimension $\ge 2$. 
To construct such an example, take an afine integral variety $X$ over an algebraically closed field with a unique  non-normal point $p$, of any dimension $d\ge 2$ (e.g. identify two closed points in the affine space of dimension $d$). Let $f$ be a regular function on the normalization $X′$ of $X$, but not regular on $X$. Take a scalar $c$ in the ground field such that $c\ne f(q)$ for every $q\in X′$ lying over $p$. Then, shrinking $X$ around $p$ if necessary, $f−c$ is invertible in $O_{X'}(X′)$ and is a non-regular rational function on $X$. The support of the Cartier divisor $D:=\mathrm{div}(f−c)$ on $X$ is just $p$ because $X'\to X$ is an isomorphism outside of $p$, hence the support has codimension $d\ge 2$ in $X$. 
