Menu

#1710 VARCHAR without length in table creation

current-release
open-works-for-me
None
5
2024-07-12
2024-07-11
prrvchr
No

If I connect with the file://... protocol I can create a table with the command:
CREATE TABLE test_table (col_0 VARCHAR)
If I connect with the hsql://... protocol when I create a table with the command:
CREATE TABLE test_table (col_0 VARCHAR)
I have the error message:
length must be specified in type definition: VARCHAR

Discussion

  • Fred Toussi

    Fred Toussi - 2024-07-11

    Please check you are running 2.7.3 both as client and server.

     
  • prrvchr

    prrvchr - 2024-07-11

    I'm not really sure. I check and say.

     
  • prrvchr

    prrvchr - 2024-07-11

    You are right Fred, I had the server in 2.7.2 and the client 2.7.3.
    If I test under 2.7.3 then the message disappears...
    Bravo for identifying this problem so quickly and sorry for the inconvenience...

     
  • prrvchr

    prrvchr - 2024-07-11

    I am trying to integrate HsqlDB into Trino with the creation of a new HsqlDB connector.
    Perhaps it is possible to know the version of the JDBC client (it seems that the server version can be obtained by DatabaseMetaData.getDriverVersion()) in order to be able to write a test verifying that the server and the JDBC client are of the same version?

     

    Last edit: prrvchr 2024-07-11
  • Fred Toussi

    Fred Toussi - 2024-07-12

    Two different methods of DatabaseMetaData return the driver and the database versions:

    /**
    
     * Retrieves the version number of this JDBC driver as a {@code String}.
     *
     * @return JDBC driver version
     * @throws SQLException if a database access error occurs
     */
    public String getDriverVersion() throws SQLException
    
    
    /**
    
     * Retrieves the version number of this database product.
     *
     * @return database version number
     * @throws SQLException if a database access error occurs
     */
    public String getDatabaseProductVersion() throws SQLException
    
     
  • prrvchr

    prrvchr - 2024-07-12

    Thank you Fred.

     
  • Fred Toussi

    Fred Toussi - 2024-07-12
    • status: open --> open-works-for-me
    • assigned_to: Fred Toussi
     

Log in to post a comment.

MongoDB Logo MongoDB