[
https://issues.apache.org/jira/browse/DERBY-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
A B updated DERBY-2605:
-----------------------
Attachment: d2605_inc_v1.patch
Hi James,
Thank you for your willingness to pick this up! I think it'd be great to fix
this issue before the 10.3 release, to minimize impact on potential users.
That said, I took a quick look at this issue on Friday and managed a small,
incomplete patch that tried to solve this problem in a slightly different way.
I never got around to commenting or posting because other things came up.
I'm posting the *incomplete* patch that I threw together here. Note that right
now the code just prints out an error "OOPS" instead of throwing an exception,
and it doesn't have any test cases. It also does not catch all of the types
that your patch catches--though it should be possible to extend it in that way.
In any event, I thought I'd post it as an alternate approach ("food for
thought") in case it's useful.
The notable thing about d2605_inc_v1.patch is that it addresses the DECIMAL
error that I mentioned on derby-dev. It also avoids the need to add a new
variable to TypeId...although that's probably not a big deal.
> I am wondering if the VALUES statement should even be allowed to create rows
> with invalid decimal precision.
I was wondering that, too. And I'm not sure what the answer is. But for what
it's worth, it looks we can actually catch this particular scenario at bind
time *if* the assumption is that the only way to create such a value is via a
literal. That seems like a valid assumption to me, but I haven't investigated
fully and thus I could be wrong.
Feel free to use or ignore the incomplete code as you see fit :) Either way,
thanks again for choosing to work on this issue.
> You can create BOOLEAN columns in 10.3
> --------------------------------------
>
> Key: DERBY-2605
> URL: https://issues.apache.org/jira/browse/DERBY-2605
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.0.0
> Reporter: Rick Hillegas
> Assigned To: James F. Adams
> Attachments: d2605_inc_v1.patch, d2605_v1.patch, d2605_v1.stat
>
>
> The work on DERBY-64 seems to have opened up a wormhole by which you can
> create user tables with BOOLEAN columns. The following script shows how to do
> this:
> drop table foo;
> create table foo
> as select systemalias from sys.sysaliases with no data;
> rename column foo.systemalias to boolcol;
> alter table foo
> alter column boolcol null;
> select c.columndatatype
> from sys.syscolumns c, sys.systables t
> where t.tableid=c.referenceid
> and t.tablename='FOO';
> insert into foo( boolcol )
> values
> ( 0 ),
> ( 1 ),
> ( cast (null as int) )
> ;
> select * from foo;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.