db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-195) isSearchable() returns true for a calculated field
Date Wed, 16 Jun 2010 11:22:23 GMT

    [ https://issues.apache.org/jira/browse/DERBY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879307#action_12879307
] 

Knut Anders Hatlen commented on DERBY-195:
------------------------------------------

One more data point: MySQL and PostgreSQL always return true when isSearchable() is called.

I haven't been able to find anything more specific in the JDBC spec than this sentence in
isSearchable()'s javadoc: "Indicates whether the designated column can be used in a where
clause." I haven't found what "can be used in a where clause" means exactly.

Strictly speaking, the column 1 can be used in a where clause. For example:

  SELECT * FROM T WHERE 1=1

or

  SELECT * FROM T WHERE X < 1

Would it make sense to close this bug for now, and rather reopen it if someone can point us
to where the standard says it should return false in this case?

> isSearchable() returns true for a calculated field
> --------------------------------------------------
>
>                 Key: DERBY-195
>                 URL: https://issues.apache.org/jira/browse/DERBY-195
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.0.2.0
>         Environment: Windows XP SP1 Professional
>            Reporter: George Baklarz
>
> Issuing a ResultSetMetaData isSearchable() against a computing column returns a TRUE
value. i.e. SELECT NAME, ADDRESS, 1 FROM EMPLOYEE .... will return a value of TRUE for isSearchable
against the computed value (1) in the SELECT list. Is that what is supposed to be returned
for a computed column?
> It may be that I misunderstood the semantics for what isSearchable() is supposed to do.
I thought that a column with isSearchable()=true can be used in a subsequent WHERE clause.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message