[Babase] Altering Boolean column in Schema Pop-bio
Lacey Maryott Roerish
lkm9 at duke.edu
Thu Aug 26 12:13:21 EDT 2010
On Thu, Aug 26, 2010 at 12:09 PM, Karl O. Pinc <kop at meme.com> wrote:
> 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.
The error message just says 'alteration failed' it contains no helpful info
:-\.
>
> 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.
>
I'll just recreate the table since I have already emptied it and have the
data...
>
>
>
> Karl <kop at meme.com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
>
--
- -
Lacey K. Maryott Roerish
Alberts Lab
Department of Biology
Duke University
ph: 919-660-7306
fax: 919-660-7293
Lacey.Maryott at duke.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://eeblistserv.Princeton.EDU/pipermail/babase/attachments/20100826/41d154d3/attachment.html
More information about the Babase
mailing list