mariuz / flamerobin

FlameRobin is a database administration tool for Firebird RDBMS. Our goal is to build a tool that is: lightweight (small footprint, fast execution) cross-platform (Linux, Windows, Mac OS X, FreeBSD) dependent only on other Open Source software
http://flamerobin.org
MIT License
211 stars 64 forks source link

User Collation #341

Closed Jdochoa closed 7 months ago

Jdochoa commented 8 months ago

Added user-collation node.

mariuz commented 8 months ago

@Jdochoa Looks fine at first look

arvanus commented 8 months ago

Hi! Looks like you neet to push CHARACTERSET.hml image

Also right-click Characterset->alter does nothing

arvanus commented 8 months ago

Also no collation is displayed, and add spaces into new collation template: "[CASE [IN]SENSITIVE] \n" "[ACCENT [IN]SENSITIVE] \n"

Jdochoa commented 8 months ago

Hi! Looks like you neet to push CHARACTERSET.hml image

Also right-click Characterset->alter does nothing

It's my mistake, the visual part of characterset is not implemented yet. It's already commit

Jdochoa commented 8 months ago

Also no collation is displayed, and add spaces into new collation template: "[CASE [IN]SENSITIVE] \n" "[ACCENT [IN]SENSITIVE] \n"

This is the implementation of User Collation, not the of System Collation.

arvanus commented 8 months ago

The DDL generated differs from the creation of the collation

CREATE COLLATION PT_BR_CI_COMPR
  FOR ISO8859_1 
  FROM PT_PT
  PAD SPACE
  CASE INSENSITIVE
  'DISABLE-COMPRESSIONS=0;DISABLE-EXPANSIONS=0

Output:

CREATE COLLATION PT_BR_CI_COMPR
  FOR ISO8859_1 
  FROM EXTERNAL ('PT_PT') 
  PAD SPACE
  CASE INSENSITIVE
  'DISABLE-COMPRESSIONS=0;DISABLE-EXPANSIONS=0'
; 

Attention to FROM EXTERNAL ('PT_PT')

Never needed to create a collation, so don't know it it can cause any problems

Jdochoa commented 8 months ago

The DDL generated differs from the creation of the collation

CREATE COLLATION PT_BR_CI_COMPR
  FOR ISO8859_1 
  FROM PT_PT
  PAD SPACE
  CASE INSENSITIVE
  'DISABLE-COMPRESSIONS=0;DISABLE-EXPANSIONS=0

Output:

CREATE COLLATION PT_BR_CI_COMPR
  FOR ISO8859_1 
  FROM EXTERNAL ('PT_PT') 
  PAD SPACE
  CASE INSENSITIVE
  'DISABLE-COMPRESSIONS=0;DISABLE-EXPANSIONS=0'
; 

Attention to FROM EXTERNAL ('PT_PT')

Never needed to create a collation, so don't know it it can cause any problems

Hi @arvanus , please see https://firebirdsql.org/refdocs/langrefupd25-ddl-collation.html#langrefupd25-ddl-collation-create

arvanus commented 8 months ago

Hi @Jdochoa So, I reading from here: https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref40/fblangref40-ddl-collation.html

The optional FROM clause specifies the base collation that is used to derive a new collation. This collation must already be present in the database. If the keyword EXTERNAL is specified, then Firebird will scan the .conf files in $fbroot/intl/, where extname must exactly match the name in the configuration file (case-sensitive).

If no FROM clause is present, Firebird will scan the .conf file(s) in the intl subdirectory for a collation with the collation name specified in CREATE COLLATION. In other words, omitting the FROM basecoll clause is equivalent to specifying FROM EXTERNAL ('collname').

Looks like they are different

Jdochoa commented 8 months ago

Hi @Jdochoa So, I reading from here: https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref40/fblangref40-ddl-collation.html

The optional FROM clause specifies the base collation that is used to derive a new collation. This collation must already be present in the database. If the keyword EXTERNAL is specified, then Firebird will scan the .conf files in $fbroot/intl/, where extname must exactly match the name in the configuration file (case-sensitive).

If no FROM clause is present, Firebird will scan the .conf file(s) in the intl subdirectory for a collation with the collation name specified in CREATE COLLATION. In other words, omitting the FROM basecoll clause is equivalent to specifying FROM EXTERNAL ('collname').

Looks like they are different

Hi @arvanus ,

I understand what you are saying, but check how ISQL shows it.

imagen