empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francis De Brabandere (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] Updated: (EMPIREDB-37) In Postgrql "BLOB" type not exist but is possible to create a "bytea" column
Date Fri, 27 Mar 2009 19:16:50 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Francis De Brabandere updated EMPIREDB-37:
------------------------------------------

    Description: 
Mail from frank Lupo:

In Postgrql "BLOB" type not exist but is possible to create a "bytea" column.

in DBDatabaseDriverPostgreSQL.java
          case BLOB:
              sql.append("BLOB");
              if (c.getSize() > 0)
                  sql.append(" (" + String.valueOf((long) c.getSize()) + ") ");
              break;

change in
          case BLOB:
              sql.append("bytea");
              break;


http://www.postgresql.org/docs/8.3/static/datatype.html
http://jdbc.postgresql.org/documentation/80/binary-data.html


second mail:

Hi,
in DBDatabaseDriverPostgreSQL add the reserved keyword
see
http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html

  /**
   * Constructor for the PostgreSQL database driver.<br>
   */
  public DBDatabaseDriverPostgreSQL() {
      // Default Constructor

      // list of reserved keywords
      //
http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
      reservedSQLKeywords.add("ALL".toLowerCase());
      reservedSQLKeywords.add("ANALYSE".toLowerCase());
      reservedSQLKeywords.add("ANALYZE".toLowerCase());
      reservedSQLKeywords.add("AND".toLowerCase());
      reservedSQLKeywords.add("ANY".toLowerCase());
      reservedSQLKeywords.add("ARRAY".toLowerCase());
      reservedSQLKeywords.add("AS".toLowerCase());
      reservedSQLKeywords.add("ASC".toLowerCase());
      reservedSQLKeywords.add("ASYMMETRIC".toLowerCase());
      reservedSQLKeywords.add("AUTHORIZATION".toLowerCase());
      reservedSQLKeywords.add("BETWEEN".toLowerCase());
      reservedSQLKeywords.add("BINARY".toLowerCase());
      reservedSQLKeywords.add("BOTH".toLowerCase());
      reservedSQLKeywords.add("CASE".toLowerCase());
      reservedSQLKeywords.add("CAST".toLowerCase());
      reservedSQLKeywords.add("CHECK".toLowerCase());
      reservedSQLKeywords.add("COLLATE".toLowerCase());
      reservedSQLKeywords.add("COLUMN".toLowerCase());
      reservedSQLKeywords.add("CONSTRAINT".toLowerCase());
      reservedSQLKeywords.add("CREATE".toLowerCase());
      reservedSQLKeywords.add("CROSS".toLowerCase());
      reservedSQLKeywords.add("CURRENT_DATE".toLowerCase());
      reservedSQLKeywords.add("CURRENT_ROLE".toLowerCase());
      reservedSQLKeywords.add("CURRENT_TIME".toLowerCase());
      reservedSQLKeywords.add("CURRENT_TIMESTAMP".toLowerCase());
      reservedSQLKeywords.add("CURRENT_USER".toLowerCase());
      reservedSQLKeywords.add("DEFAULT".toLowerCase());
      reservedSQLKeywords.add("DEFERRABLE".toLowerCase());
      reservedSQLKeywords.add("DESC".toLowerCase());
      reservedSQLKeywords.add("DISTINCT".toLowerCase());
      reservedSQLKeywords.add("DO".toLowerCase());
      reservedSQLKeywords.add("ELSE".toLowerCase());
      reservedSQLKeywords.add("END".toLowerCase());
      reservedSQLKeywords.add("EXCEPT".toLowerCase());
      reservedSQLKeywords.add("FALSE".toLowerCase());
      reservedSQLKeywords.add("FOR".toLowerCase());
      reservedSQLKeywords.add("FOREIGN".toLowerCase());
      reservedSQLKeywords.add("FREEZE".toLowerCase());
      reservedSQLKeywords.add("FROM".toLowerCase());
      reservedSQLKeywords.add("FULL".toLowerCase());
      reservedSQLKeywords.add("GRANT".toLowerCase());
      reservedSQLKeywords.add("GROUP".toLowerCase());
      reservedSQLKeywords.add("HAVING".toLowerCase());
      reservedSQLKeywords.add("ILIKE".toLowerCase());
      reservedSQLKeywords.add("IN".toLowerCase());
      reservedSQLKeywords.add("INITIALLY".toLowerCase());
      reservedSQLKeywords.add("INNER".toLowerCase());
      reservedSQLKeywords.add("INTERSECT".toLowerCase());
      reservedSQLKeywords.add("INTO".toLowerCase());
      reservedSQLKeywords.add("IS".toLowerCase());
      reservedSQLKeywords.add("ISNULL".toLowerCase());
      reservedSQLKeywords.add("JOIN".toLowerCase());
      reservedSQLKeywords.add("LEADING".toLowerCase());
      reservedSQLKeywords.add("LEFT".toLowerCase());
      reservedSQLKeywords.add("LIKE".toLowerCase());
      reservedSQLKeywords.add("LIMIT".toLowerCase());
      reservedSQLKeywords.add("LOCALTIME".toLowerCase());
      reservedSQLKeywords.add("LOCALTIMESTAMP".toLowerCase());
      reservedSQLKeywords.add("NATURAL".toLowerCase());
      reservedSQLKeywords.add("NEW".toLowerCase());
      reservedSQLKeywords.add("NOT".toLowerCase());
      reservedSQLKeywords.add("NOTNULL".toLowerCase());
      reservedSQLKeywords.add("NULL".toLowerCase());
      reservedSQLKeywords.add("OFF".toLowerCase());
      reservedSQLKeywords.add("OFFSET".toLowerCase());
      reservedSQLKeywords.add("OLD".toLowerCase());
      reservedSQLKeywords.add("ON".toLowerCase());
      reservedSQLKeywords.add("ONLY".toLowerCase());
      reservedSQLKeywords.add("OR".toLowerCase());
      reservedSQLKeywords.add("ORDER".toLowerCase());
      reservedSQLKeywords.add("OUTER".toLowerCase());
      reservedSQLKeywords.add("OVERLAPS".toLowerCase());
      reservedSQLKeywords.add("PLACING".toLowerCase());
      reservedSQLKeywords.add("PRIMARY".toLowerCase());
      reservedSQLKeywords.add("REFERENCES".toLowerCase());
      reservedSQLKeywords.add("RETURNING".toLowerCase());
      reservedSQLKeywords.add("RIGHT".toLowerCase());
      reservedSQLKeywords.add("SELECT".toLowerCase());
      reservedSQLKeywords.add("SESSION_USER".toLowerCase());
      reservedSQLKeywords.add("SIMILAR".toLowerCase());
      reservedSQLKeywords.add("SOME".toLowerCase());
      reservedSQLKeywords.add("SYMMETRIC".toLowerCase());
      reservedSQLKeywords.add("TABLE".toLowerCase());
      reservedSQLKeywords.add("THEN".toLowerCase());
      reservedSQLKeywords.add("TO".toLowerCase());
      reservedSQLKeywords.add("TRAILING".toLowerCase());
      reservedSQLKeywords.add("TRUE".toLowerCase());
      reservedSQLKeywords.add("UNION".toLowerCase());
      reservedSQLKeywords.add("UNIQUE".toLowerCase());
      reservedSQLKeywords.add("USER".toLowerCase());
      reservedSQLKeywords.add("USING".toLowerCase());
      reservedSQLKeywords.add("VERBOSE".toLowerCase());
      reservedSQLKeywords.add("WHEN".toLowerCase());
      reservedSQLKeywords.add("WHERE".toLowerCase());
      reservedSQLKeywords.add("WITH".toLowerCase());
  }


  was:
Mail from frank Lupo:

In Postgrql "BLOB" type not exist but is possible to create a "bytea" column.

in DBDatabaseDriverPostgreSQL.java
          case BLOB:
              sql.append("BLOB");
              if (c.getSize() > 0)
                  sql.append(" (" + String.valueOf((long) c.getSize()) + ") ");
              break;

change in
          case BLOB:
              sql.append("bytea");
              break;


http://www.postgresql.org/docs/8.3/static/datatype.html
http://jdbc.postgresql.org/documentation/80/binary-data.html



> In Postgrql "BLOB" type not exist but is possible to create a "bytea" column
> ----------------------------------------------------------------------------
>
>                 Key: EMPIREDB-37
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-37
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.0.5-incubating
>            Reporter: Francis De Brabandere
>            Assignee: Francis De Brabandere
>
> Mail from frank Lupo:
> In Postgrql "BLOB" type not exist but is possible to create a "bytea" column.
> in DBDatabaseDriverPostgreSQL.java
>           case BLOB:
>               sql.append("BLOB");
>               if (c.getSize() > 0)
>                   sql.append(" (" + String.valueOf((long) c.getSize()) + ") ");
>               break;
> change in
>           case BLOB:
>               sql.append("bytea");
>               break;
> http://www.postgresql.org/docs/8.3/static/datatype.html
> http://jdbc.postgresql.org/documentation/80/binary-data.html
> second mail:
> Hi,
> in DBDatabaseDriverPostgreSQL add the reserved keyword
> see
> http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
>   /**
>    * Constructor for the PostgreSQL database driver.<br>
>    */
>   public DBDatabaseDriverPostgreSQL() {
>       // Default Constructor
>       // list of reserved keywords
>       //
> http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
>       reservedSQLKeywords.add("ALL".toLowerCase());
>       reservedSQLKeywords.add("ANALYSE".toLowerCase());
>       reservedSQLKeywords.add("ANALYZE".toLowerCase());
>       reservedSQLKeywords.add("AND".toLowerCase());
>       reservedSQLKeywords.add("ANY".toLowerCase());
>       reservedSQLKeywords.add("ARRAY".toLowerCase());
>       reservedSQLKeywords.add("AS".toLowerCase());
>       reservedSQLKeywords.add("ASC".toLowerCase());
>       reservedSQLKeywords.add("ASYMMETRIC".toLowerCase());
>       reservedSQLKeywords.add("AUTHORIZATION".toLowerCase());
>       reservedSQLKeywords.add("BETWEEN".toLowerCase());
>       reservedSQLKeywords.add("BINARY".toLowerCase());
>       reservedSQLKeywords.add("BOTH".toLowerCase());
>       reservedSQLKeywords.add("CASE".toLowerCase());
>       reservedSQLKeywords.add("CAST".toLowerCase());
>       reservedSQLKeywords.add("CHECK".toLowerCase());
>       reservedSQLKeywords.add("COLLATE".toLowerCase());
>       reservedSQLKeywords.add("COLUMN".toLowerCase());
>       reservedSQLKeywords.add("CONSTRAINT".toLowerCase());
>       reservedSQLKeywords.add("CREATE".toLowerCase());
>       reservedSQLKeywords.add("CROSS".toLowerCase());
>       reservedSQLKeywords.add("CURRENT_DATE".toLowerCase());
>       reservedSQLKeywords.add("CURRENT_ROLE".toLowerCase());
>       reservedSQLKeywords.add("CURRENT_TIME".toLowerCase());
>       reservedSQLKeywords.add("CURRENT_TIMESTAMP".toLowerCase());
>       reservedSQLKeywords.add("CURRENT_USER".toLowerCase());
>       reservedSQLKeywords.add("DEFAULT".toLowerCase());
>       reservedSQLKeywords.add("DEFERRABLE".toLowerCase());
>       reservedSQLKeywords.add("DESC".toLowerCase());
>       reservedSQLKeywords.add("DISTINCT".toLowerCase());
>       reservedSQLKeywords.add("DO".toLowerCase());
>       reservedSQLKeywords.add("ELSE".toLowerCase());
>       reservedSQLKeywords.add("END".toLowerCase());
>       reservedSQLKeywords.add("EXCEPT".toLowerCase());
>       reservedSQLKeywords.add("FALSE".toLowerCase());
>       reservedSQLKeywords.add("FOR".toLowerCase());
>       reservedSQLKeywords.add("FOREIGN".toLowerCase());
>       reservedSQLKeywords.add("FREEZE".toLowerCase());
>       reservedSQLKeywords.add("FROM".toLowerCase());
>       reservedSQLKeywords.add("FULL".toLowerCase());
>       reservedSQLKeywords.add("GRANT".toLowerCase());
>       reservedSQLKeywords.add("GROUP".toLowerCase());
>       reservedSQLKeywords.add("HAVING".toLowerCase());
>       reservedSQLKeywords.add("ILIKE".toLowerCase());
>       reservedSQLKeywords.add("IN".toLowerCase());
>       reservedSQLKeywords.add("INITIALLY".toLowerCase());
>       reservedSQLKeywords.add("INNER".toLowerCase());
>       reservedSQLKeywords.add("INTERSECT".toLowerCase());
>       reservedSQLKeywords.add("INTO".toLowerCase());
>       reservedSQLKeywords.add("IS".toLowerCase());
>       reservedSQLKeywords.add("ISNULL".toLowerCase());
>       reservedSQLKeywords.add("JOIN".toLowerCase());
>       reservedSQLKeywords.add("LEADING".toLowerCase());
>       reservedSQLKeywords.add("LEFT".toLowerCase());
>       reservedSQLKeywords.add("LIKE".toLowerCase());
>       reservedSQLKeywords.add("LIMIT".toLowerCase());
>       reservedSQLKeywords.add("LOCALTIME".toLowerCase());
>       reservedSQLKeywords.add("LOCALTIMESTAMP".toLowerCase());
>       reservedSQLKeywords.add("NATURAL".toLowerCase());
>       reservedSQLKeywords.add("NEW".toLowerCase());
>       reservedSQLKeywords.add("NOT".toLowerCase());
>       reservedSQLKeywords.add("NOTNULL".toLowerCase());
>       reservedSQLKeywords.add("NULL".toLowerCase());
>       reservedSQLKeywords.add("OFF".toLowerCase());
>       reservedSQLKeywords.add("OFFSET".toLowerCase());
>       reservedSQLKeywords.add("OLD".toLowerCase());
>       reservedSQLKeywords.add("ON".toLowerCase());
>       reservedSQLKeywords.add("ONLY".toLowerCase());
>       reservedSQLKeywords.add("OR".toLowerCase());
>       reservedSQLKeywords.add("ORDER".toLowerCase());
>       reservedSQLKeywords.add("OUTER".toLowerCase());
>       reservedSQLKeywords.add("OVERLAPS".toLowerCase());
>       reservedSQLKeywords.add("PLACING".toLowerCase());
>       reservedSQLKeywords.add("PRIMARY".toLowerCase());
>       reservedSQLKeywords.add("REFERENCES".toLowerCase());
>       reservedSQLKeywords.add("RETURNING".toLowerCase());
>       reservedSQLKeywords.add("RIGHT".toLowerCase());
>       reservedSQLKeywords.add("SELECT".toLowerCase());
>       reservedSQLKeywords.add("SESSION_USER".toLowerCase());
>       reservedSQLKeywords.add("SIMILAR".toLowerCase());
>       reservedSQLKeywords.add("SOME".toLowerCase());
>       reservedSQLKeywords.add("SYMMETRIC".toLowerCase());
>       reservedSQLKeywords.add("TABLE".toLowerCase());
>       reservedSQLKeywords.add("THEN".toLowerCase());
>       reservedSQLKeywords.add("TO".toLowerCase());
>       reservedSQLKeywords.add("TRAILING".toLowerCase());
>       reservedSQLKeywords.add("TRUE".toLowerCase());
>       reservedSQLKeywords.add("UNION".toLowerCase());
>       reservedSQLKeywords.add("UNIQUE".toLowerCase());
>       reservedSQLKeywords.add("USER".toLowerCase());
>       reservedSQLKeywords.add("USING".toLowerCase());
>       reservedSQLKeywords.add("VERBOSE".toLowerCase());
>       reservedSQLKeywords.add("WHEN".toLowerCase());
>       reservedSQLKeywords.add("WHERE".toLowerCase());
>       reservedSQLKeywords.add("WITH".toLowerCase());
>   }

-- 
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