Blob datatype with Informix 7.31
Posted in 2009
Topics: General Discussion
I have a situation where I need to set a default value in a blob datatype. What I really need to do is set the blob datatype to be "NOT NULL" so I need to set the column to a value and make sure any new records have a "default" value. So can I set a blob datatype to have a default value?
On Mon, Feb 23, 2009 at 1:44 PM, PAUL MITSUUCHI <paul.mitsuuchi@digitalinsight.com> wrote: > I have a situation where I need to set a default value in a blob datatype. > What I really need to do is set the blob datatype to be "NOT NULL" so I need > to set the column to a value and make sure any new records have a "default" > value. So can I set a blob datatype to have a default value? No - mainly because there is no way to specify a literal value for a blob operation. The same comment applies to IDS versions up to and including 11.50. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
workaround : create a INSERT trigger + stored procedure to insert the default value? --- Em seg, 23/2/09, Jonathan Leffler <jleffler.iiug@gmail.com> escreveu: De: Jonathan Leffler <jleffler.iiug@gmail.com> Assunto: Re: Blob datatype with Informix 7.31 [14980] Para: ids@iiug.org Data: Segunda-feira, 23 de Fevereiro de 2009, 21:13 On Mon, Feb 23, 2009 at 1:44 PM, PAUL MITSUUCHI <paul.mitsuuchi@digitalinsight.com> wrote: > I have a situation where I need to set a default value in a blob datatype. > What I really need to do is set the blob datatype to be "NOT NULL" so I need > to set the column to a value and make sure any new records have a "default" > value. So can I set a blob datatype to have a default value? No - mainly because there is no way to specify a literal value for a blob operation. The same comment applies to IDS versions up to and including 11.50. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum. Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com