<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Are bitwise operations supported?"]]></title>
		<link>http://forums.enterprisedb.com/posts/list/7.page</link>
		<description><![CDATA[Latest messages posted in the topic "Are bitwise operations supported?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Are bitwise operations supported?</title>
				<description><![CDATA[ I'm trying to execute rather simple SELECT statement:<br /> <br /> SELECT a FROM "Category" t0 WHERE t0.a & b'101' = b'101' LIMIT 10<br /> <br /> where "a" is a field type BIT, which according to GridSQL SQL Reference is supported.<br /> <br /> I keep getting the following error:<br /> <br /> [severe] java.sql.SQLException: ERROR: Cannot Determine The Expression For (EXPRESSION)("t0"."a" & b'101')<br /> 	at com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2306)<br /> 	at com.edb.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1931)<br /> 	at com.edb.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:643)<br /> 	at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:476)<br /> 	at com.edb.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:390)<br /> 	at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:340)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> 	at java.lang.reflect.Method.invoke(Method.java:597)<br /> 	at com.edb.ds.common.PooledConnectionImpl$StatementHandler.invoke(PooledConnectionImpl.java:414)<br /> 	at $Proxy1.execute(Unknown Source)<br /> <br /> <br /> Server: Postgres 8.4<br /> GridSQL build: 1.1b<br /> Excerpt from console.log:<br /> <br /> com.edb.gridsql.parser.core.ParseException: Cannot Determine The Expression For (EXPRESSION)("t0"."a" & b'101')<br /> 	at com.edb.gridsql.parser.Parser.parse(Unknown Source)<br /> 	at com.edb.gridsql.parser.Parser.parseStatement(Unknown Source)<br /> 	at com.edb.gridsql.protocol.RequestAnalyzer.getExecutableRequest(Unknown Source)<br /> 	at com.edb.gridsql.protocol.PgProtocolSession.run(Unknown Source)<br /> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)<br /> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br /> 	at java.lang.Thread.run(Unknown Source)<br /> <br /> <br /> Oddly enough, if left part of the expression explicitly casted, the statement goes through:<br /> <br /> SELECT a FROM "Category" t0 WHERE t0.a::int & 5 = 5 LIMIT 10<br /> <br /> Unfortunately this workaround wouldn't work for me, because BIT field length is 1000 <img src="http://forums.enterprisedb.com//images/smilies/9d71f0541cff0a302a0309c5079e8dee.gif" /><br /> <br /> Please advice.<br /> <br /> Thank you,<br /> Anton<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forums.enterprisedb.com/posts/preList/2160/8019.page</guid>
				<link>http://forums.enterprisedb.com/posts/preList/2160/8019.page</link>
				<pubDate><![CDATA[Fri, 5 Feb 2010 15:58:36]]> GMT</pubDate>
				<author><![CDATA[ A_C_7]]></author>
			</item>
			<item>
				<title>Re:Are bitwise operations supported?</title>
				<description><![CDATA[ This does appear to be a problem. We will look into the level of effort for fixing this.<br /> <br /> Thanks,<br /> <br /> Mason<br /> ]]></description>
				<guid isPermaLink="true">http://forums.enterprisedb.com/posts/preList/2160/8029.page</guid>
				<link>http://forums.enterprisedb.com/posts/preList/2160/8029.page</link>
				<pubDate><![CDATA[Wed, 10 Feb 2010 20:00:56]]> GMT</pubDate>
				<author><![CDATA[ Mason_S]]></author>
			</item>
	</channel>
</rss>
