Re: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
> Thanks for instructions. It does work.
>
>
>
> Is there a way to use created case insensitive collation as database wide 
> default? It would be easier for me not to specify collation for each and 
> every index definition.

http://www.firebirdsql.org/refdocs/langrefupd25-ddl-charset.html

This does not affect existing character fields though.


-- 
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.


>
>
>
> Thanks.
>
>
>
> From: firebird-support@yahoogroups.com 
> [mailto:firebird-support@yahoogroups.com]
> Sent: Friday, April 8, 2016 10:36 AM
> To: firebird-support@yahoogroups.com
> Subject: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key 
> question
>
>
>
>
>
> On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr
> [firebird-support] wrote:
>> Would you be so kind to provide an example SQL which shows how to do
>> primary key with a case insensitive collation?
>
> 1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf,
> but not included by default in Firebird):
>
> create collation WIN1254_UNICODE for win1254
>
> 2. Derive a case insensitive collation from WIN1254_UNICODE:
>
> create collation win1254_ci for win1254 from win1254_unicode case
> insensitive
>
> 3. Create table
>
> create table win1254test (
> stringkey varchar(30) character set win1254 primary key collate
> win1254_ci
> )
>
> 4. Test it:
>
> INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
> INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
> INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
> INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails
>
> I hope this helps,
> Mark
>


RE: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr [firebird-support]
Thanks for instructions. It does work.

 

Is there a way to use created case insensitive collation as database wide 
default? It would be easier for me not to specify collation for each and every 
index definition.

 

Thanks.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, April 8, 2016 10:36 AM
To: firebird-support@yahoogroups.com
Subject: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key 
question

 

  

On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr 
[firebird-support] wrote:
> Would you be so kind to provide an example SQL which shows how to do
> primary key with a case insensitive collation?

1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf, 
but not included by default in Firebird):

create collation WIN1254_UNICODE for win1254

2. Derive a case insensitive collation from WIN1254_UNICODE:

create collation win1254_ci for win1254 from win1254_unicode case 
insensitive

3. Create table

create table win1254test (
stringkey varchar(30) character set win1254 primary key collate 
win1254_ci
)

4. Test it:

INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails

I hope this helps,
Mark
-- 
Mark Rotteveel





[Non-text portions of this message have been removed]



Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr 
[firebird-support] wrote:
> Would you be so kind to provide an example SQL which shows how to do
> primary key with a case insensitive collation?

1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf, 
but not included by default in Firebird):

create collation WIN1254_UNICODE for win1254

2. Derive a case insensitive collation from WIN1254_UNICODE:

create collation win1254_ci for win1254 from win1254_unicode case 
insensitive

3. Create table

create table win1254test (
stringkey varchar(30) character set win1254 primary key collate 
win1254_ci
)

4. Test it:

INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails

I hope this helps,
Mark
-- 
Mark Rotteveel


RE: Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-07 Thread Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr [firebird-support]
Would you be so kind to provide an example SQL which shows how to do primary 
key with a case insensitive collation?

 

Thanks.

 

Ertan

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, April 7, 2016 8:54 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird V3RC2 Primary Key question

 

  

This is the default and expected behavior. If you want case insensitive, then 
you need to create the primary key column with a case insensitive collation.

 

Mark

 

 

- Bericht beantwoorden -
Van: "Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr 
<mailto:ertan.kucuko...@1nar.com.tr>  [firebird-support]" 
<firebird-support@yahoogroups.com <mailto:firebird-support@yahoogroups.com> >
Aan: <firebird-support@yahoogroups.com 
<mailto:firebird-support@yahoogroups.com> >
Onderwerp: [firebird-support] Firebird V3RC2 Primary Key question
Datum: do, apr. 7, 2016 19:46

 

Hi,

 

It’s been a while since I last used Firebird. I am testing new release 
candidate at the moment. Just found something I am not so sure.

 

I have a database created using “CharSet WIN1254” parameter.

 

Below is the SQL I used to create a table in that database:

CREATE TABLE KULLANICI

(

  KODU VARCHAR(30)  NOT NULL PRIMARY KEY,

  ADI VARCHAR(50),

  SIFRE VARCHAR(64),

  EMAIL VARCHAR(60),

);

 

And, all below executes without error:

INSERT INTO KULLANICI(KODU) VALUES(‘EK’);

INSERT INTO KULLANICI(KODU) VALUES(‘ek’);

INSERT INTO KULLANICI(KODU) VALUES(‘Ek’);

INSERT INTO KULLANICI(KODU) VALUES(‘eK’);

 

I can insert “EK”, “ek”, “Ek”, and “eK” as new records in the KODU column of 
that table. Somehow primary key of that table is case-sensitive.

 

I couldn’t find anything about primary key defaults to case-sensitive in the 
“Firebird-3.0.0_RC2-ReleaseNotes.pdf”. I don’t remember if that was the case in 
earlier versions, too. Just want to be sure about it. Can anybody confirm if 
that is a feature?

 

On my part, I would like to avoid it if possible.

Thanks.

 

Regards,

Ertan Küçükoğlu





Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-07 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
This is the default and expected behavior. If you want case insensitive, then 
you need to create the primary key column with a case insensitive collation.
Mark

- Bericht beantwoorden -
Van: "Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr [firebird-support]" 

Aan: 
Onderwerp: [firebird-support] Firebird V3RC2 Primary Key question
Datum: do, apr. 7, 2016 19:46

Hi, It’s been a while since I last used Firebird. I am testing new release 
candidate at the moment. Just found something I am not so sure. I have a 
database created using “CharSet WIN1254” parameter. Below is the SQL I used to 
create a table in that database:CREATE TABLE KULLANICI(  KODU VARCHAR(30)  NOT 
NULL PRIMARY KEY,  ADI VARCHAR(50),  SIFRE VARCHAR(64),  EMAIL VARCHAR(60),); 
And, all below executes without error:INSERT INTO KULLANICI(KODU) 
VALUES(‘EK’);INSERT INTO KULLANICI(KODU) VALUES(‘ek’);INSERT INTO 
KULLANICI(KODU) VALUES(‘Ek’);INSERT INTO KULLANICI(KODU) VALUES(‘eK’); I can 
insert “EK”, “ek”, “Ek”, and “eK” as new records in the KODU column of that 
table. Somehow primary key of that table is case-sensitive. I couldn’t find 
anything about primary key defaults to case-sensitive in the 
“Firebird-3.0.0_RC2-ReleaseNotes.pdf”. I don’t remember if that was the case in 
earlier versions, too. Just want to be sure about it. Can anybody confirm if 
that is a feature? On my part, I would like to avoid it if possible. Thanks. 
Regards,Ertan Küçükoğlu