[Babase] Altering Boolean column in Schema Pop-bio
Karl O. Pinc
kop at meme.com
Thu Aug 26 12:09:33 EDT 2010
On 08/26/2010 10:23:26 AM, Lacey Maryott Roerish wrote:
> Karl,
>
> Susan asked that I alter some data-types in a table called
> popbio.gene.
> Basically the majority of the columns contain boolean data, and they
> need to
> be changed to varchar. I tried before emptying the table, and it
> wouldn't
> alter. I then dumped the data, emptied the table, and it still won't
> work.
> I did empty the default column, which currently reads 'false' for
> each of
> these boolean columns. I Don't know why it is not letting me alter
> these.
> Is there a way to force it?
It would help if you gave me an error message.
I suspect the problem is there is no default conversion of
boolean to text. You need to dump the data. Destroy
the table and re-create it, and reload the table.
Be sure to dump as SQL, which means either not using
the -F keyword or using -F p for a plaintext sql dump.
You could probably figure out a way to create new columns,
and move column-by-column, and then destroy the
old columns -- if you really wanted to.
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
More information about the Babase
mailing list