On 07/27/2011 09:47 AM, Ionuț Arțăriși wrote:
On 07/22/2011 10:48 AM, Jan Pazdziora wrote:
On Wed, Jul 20, 2011 at 04:39:14PM +0200, Ionuț Arțăriși wrote:
Hello,

We've recently come upon a bug when trying to insert a string of 1024
unicode characters into a database column of VARCHAR2(1024 BYTE). Rather
than dealing with string encoding transformations everywhere this
issue pops up
in the code, I thought that modifying the database schema would be the
better solution.

BYTE seems to be the default for the Oracle database, but unicode
strings would map better to VARCHAR2(1024 CHAR).

The problem is that I couldn't find any way to set this in the table
schema files and get it past chameleon. chameleon just doesn't have the
right grammar defined to parse VARCHAR2(1024 CHAR) or "alter session set
nls_length_semantics=char".

So I was wondering if you guys know more about this problem or a better
solution than patching chameleon.
Replacing chameleon with a custom script (sed? perl?) which would do
the equivalent transformation but be easier to be extended would be my
preferred option.

I'll be happy to review a patch which would do that.

Adding a char to varchar2 definitions would then be step to, and piece
of cake.

Hm... writing another tool to do what chameleon currently does seems
like a massive undertaking.

Besides, the chameleon code looks quite clean and easy enough to extend.
Here's a patch that allows specifying the VARCHAR2 data type (for lack
of a better name).

Another question would be: do you guys have commit access to the
upstream chameleon project?
To my knowledge, none of the current Spacewalk team have access to Chameleon. Jeff Ortel, cc'd, is the creator and owner. Jeff please review Ionut's feedback.

Regards,
Cliff.


-Ionuț



_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to