Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 14:47, Dimitry Sibiryakov wrote: > 10.05.2018 19:14, Adriano dos Santos Fernandes wrote: >>>    IMHO, one of advantages of using UDR for subj is that much more >>> fields can be added any time as needed by upgrading a single library >>> while a virtual

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 13:32, Lester Caine wrote: > This is exactly the problem, and using TZ data direct is the only > reliable way to manage the CURRENT TZ rules. So as long as we can > switch off ICU data then this may work, otherwise it is just another > waste of time! In my case all the TZ material is

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 14:29, Adriano dos Santos Fernandes wrote: > In practical terms, it's the same as a DST change. > > A DST is nothing different than a "rule change" and another "rule > change" every year. > > Some time zones nomenclature are specific to

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 14:23, Vlad Khorsun via Firebird-devel wrote: > >>>    Look how MSK time zone was changed at 2014.10.26 >>> >>> https://www.timeanddate.com/time/zone/russia/moscow >>> >>> I think about something like this: >>> >>> ID    Name    Valid from    Offset >>> ...    MSK    2011.03.27

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 14:08, Dimitry Sibiryakov wrote: > 10.05.2018 18:44, Vlad Khorsun via Firebird-devel wrote: >>    Is it possible\make sence to add a datetime field with "valid from" >> mark ? Or something like that, some kind of version mark. > >   IMHO, one of advantages of using UDR for subj is

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 13:22, Mark Rotteveel wrote: > >> NAME VARCHAR > > Would that name be the full name like Europe/Amsterdam, or would it > also include the imprecise (duplicates are possible) like CET? > Both, each one has a different ID. Adriano

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 13:12, Vlad Khorsun via Firebird-devel wrote: > >   I guess the question is about the case when users have historical data > and need to apply old time zone rule to the old data and new timezone > rule > to the new data. > >   Is it possible\make sence to add a datetime field with

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 13:00, Dimitry Sibiryakov wrote: > 10.05.2018 17:57, Adriano dos Santos Fernandes wrote: >> May make sense, but I think we didn't defined what is the difference >> between a virtual table and these things, specially that a view would >> also accept update

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 12:53, Lester Caine wrote: > On 10/05/18 16:27, Leyne, Sean wrote: >> Q's: How will the data be defined?  In code or via some external >> file?  If external, how will changes be applied/recognized to running >> engine instance? > > And how will the version of TZ data be handled! This

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 12:39, Dimitry Sibiryakov wrote: > 10.05.2018 17:21, Adriano dos Santos Fernandes wrote: >> I want to create a virtual table that lists available time zones. > >   Why a virtual table instead of UDR or a view based on UDR? Using of > UDR would provide more flexibi

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 12:27, Leyne, Sean wrote: > > Q's: How will the data be defined? In code or via some external file? If > external, how will changes be applied/recognized to running engine instance? > > Currently the data (only mapping from Firebird ID to ICU time zone name) is defined at the code

Re: [Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
On 10/05/2018 12:27, Alex Peshkoff via Firebird-devel wrote: > On 05/10/18 18:21, Adriano dos Santos Fernandes wrote: >> Hi! >> >> I want to create a virtual table that lists available time zones. >> >> For now there is RDB$ (non-virtual), MON$ (virtual,

[Firebird-devel] Virtual table for time zones

2018-05-10 Thread Adriano dos Santos Fernandes
Hi! I want to create a virtual table that lists available time zones. For now there is RDB$ (non-virtual), MON$ (virtual, but all about monitoring), SEC$ (security plugin). What prefix should TIME_ZONES have? Adriano

Re: [Firebird-devel] Firebird v3.0.x support for External Functions plug-in

2018-05-08 Thread Adriano dos Santos Fernandes
On 07/05/2018 19:18, Leyne, Sean wrote: >   > The Firebird v3.0.x release notes outlines that plug-ins support has > been added, and mentions that it will be extended to supporting SP, > Functions and Triggers. >   > Was this ever implemented/completed? First version, since 2009. >   > {The

Re: [Firebird-devel] SET DECFLOAT command

2018-05-03 Thread Adriano dos Santos Fernandes
On 03/05/2018 09:28, Mark Rotteveel wrote: > >> The decision should be taken. Prior fb4 session control statement SET >> ROLE was treated as DDL. Now we have rather lot of such statements, >> separate type of node for them, and adding them to >> procedures/triggers bodies is not big technical

Re: [Firebird-devel] exception handling in firebird.pas

2018-05-03 Thread Adriano dos Santos Fernandes
On 03/05/2018 07:35, Adriano dos Santos Fernandes wrote: > The problem is here: > > I mean, status could be checked for being nil, but in the end, this routine probably is never called in this situation.

Re: [Firebird-devel] exception handling in firebird.pas

2018-05-03 Thread Adriano dos Santos Fernandes
On 30/04/2018 05:20, Mark Rotteveel wrote: > On 30-4-2018 09:52, fbbt wrote: >> 3. Maybe we need to put a sample of firebird.pas at github. It will >> allow other developers to patch it in more productive way than now. > > As I understand it, firebird.pas is generated by Cloop, so allowing >

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 02/05/2018 13:16, Lester Caine wrote: > On 29/04/18 21:47, Adriano dos Santos Fernandes wrote: >> But standard CURRENT_TIME and CURRENT_TIMESTAMP  works different than >> Firebird, as they returns the "WITH TIME ZONE" types. >> >> Tweaking CURRENT_TIM

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 01/05/2018 11:30, Dimitry Sibiryakov wrote: > > >> There is session time zone. Session time zone is currently defined as >> default with the server time zone. >> >> We may think that's not ideal and session time zone should be defined >> with the client time zone initially. But that per se is

[Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
Hi! Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the upstream does, i.e., with full data. It would be good if someone volunter to do it as I do not have nor even

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 02/05/2018 05:59, Stefan Heymann wrote: > Adriano, > >> Also there are new expressions, LOCALTIME and LOCALTIMESTAMP with >> functionality equivalent to the Firebird's CURRENT_TIME and >> CURRENT_TIMESTAMP. > I'd like to suggest you name these LOCAL_TIME and LOCAL_TIMESTAMP (with > the

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 11:19, Adriano dos Santos Fernandes wrote: > > Let's say first about TIMESTAMP. > Why this? Because TIME if more problematic. :) The standard (at least up to the 2013 drafts) does not talk about TZ regions, but only offsets. And a TIME with TZ region is problematic.

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 04:57, Mark Rotteveel wrote: > (resending as they haven't appeared on the list yet) > > On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: >> So before migrate to v4, users can adjust their code using Firebird 3 >> and once upgraded there will be no probl

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 07:45, Vlad Khorsun wrote: > >> - Compatibility: >> >> It was been created four new datatypes: >> - TIME WITH TIME ZONE >> - TIMESTAMP WITH TIME ZONE >> - TIME WITHOUT TIME ZONE >> - TIMESTAMP WITHOUT TIME ZONE >> >> The old types (TIME and TIMESTAMP) resolves to the "WITHOUT"

[Firebird-devel] Test

2018-04-29 Thread Adriano dos Santos Fernandes
Test, please ignore -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] encoding of result strings

2018-04-18 Thread Adriano dos Santos Fernandes
On 18/04/2018 11:52, Dev wrote: >> On 18/04/2018 04:01, Dev wrote: >>> What encoding is used for in/out strings in: >>> function IExternalContext.getUserName(): PAnsiChar; >>> function IExternalContext.getDatabaseName(): PAnsiChar; >>> function IExternalContext.getClientCharSet(): PAnsiChar; >>>

Re: [Firebird-devel] encoding of result strings

2018-04-18 Thread Adriano dos Santos Fernandes
On 18/04/2018 04:01, Dev wrote: > What encoding is used for in/out strings in: > > function IExternalContext.getUserName(): PAnsiChar; > function IExternalContext.getDatabaseName(): PAnsiChar; > function IExternalContext.getClientCharSet(): PAnsiChar; > > function

[Firebird-devel] Legacy API functions for new features?

2018-04-16 Thread Adriano dos Santos Fernandes
Hi! Should exist isc encode/decode time/timestamp tz (with time zone) API functions? Or could this be only in IUtil? Adriano -- Check out the vibrant tech community on one of the world's most engaging tech sites,

[Firebird-devel] Update ICU in Windows

2018-04-09 Thread Adriano dos Santos Fernandes
Hi! I'm looking for a way to update ICU in Windows. We used to customize ICU via this page (http://apps.icu-project.org/datacustom/ICUData52.html). There we see now only up to version 57, and latest ICU version is 61. Another problem is I don't even known the Visual Studio version that will be

Re: [Firebird-devel] Status and planning of timezone support

2018-03-31 Thread Adriano dos Santos Fernandes
On 31/03/2018 09:32, Mark Rotteveel wrote: > What is the status of timezone support. Is it still targeted for > Firebird 4, or is it going to be deferred to Firebird 5? > > I'm wondering if it isn't getting a little too close to the beta > deadline to still be considered for inclusion in Firebird

Re: [Firebird-devel] Win1252 Charset on MacOS

2018-03-21 Thread Adriano dos Santos Fernandes
On 21/03/2018 15:01, Paul Beach wrote: > Email me privately It's better that port efforts be done here in the list. Adriano -- Check out the vibrant tech community on one of the world's most engaging tech sites,

[Firebird-devel] GDS_EPOCH_START constant

2018-03-18 Thread Adriano dos Santos Fernandes
Is this constant correct? // Number of the first day of UNIX epoch in GDS counting enum { GDS_EPOCH_START = 40617 }; I see that for date 1970-01-01, Firebird stores it as 40587. Adriano -- Check out the vibrant tech

[Firebird-devel] Valid date or not

2018-02-27 Thread Adriano dos Santos Fernandes
Hi! As part of CORE-5750 problems, I found that Firebird considers '12Mar92' as a valid date (1992-03-12). Should this be considered a bug, i.e., separators should be necessary in this case (12-Mar-92, 12/Mar/92, 12.Mar.92)? Adriano

Re: [Firebird-devel] Valid date or not

2018-02-22 Thread Adriano dos Santos Fernandes
Em 22/02/2018 12:39, Dmitry Yemanov escreveu: > 22.02.2018 16:41, Alex Peshkoff wrote: >> >>> As part of CORE-5750 problems, I found that Firebird considers '12Mar92' >>> as a valid date (1992-03-12). >>> >>> Should this be considered a bug, i.e., separators should be necessary in >>> this case

[Firebird-devel] Valid date or not

2018-02-22 Thread Adriano dos Santos Fernandes
Hi! As part of CORE-5750 problems, I found that Firebird considers '12Mar92' as a valid date (1992-03-12). Should this be considered a bug, i.e., separators should be necessary in this case (12-Mar-92, 12/Mar/92, 12.Mar.92)? Adriano

[Firebird-devel] [FB-Tracker] Created: (CORE-5750) Date-time parsing is very weak

2018-02-18 Thread Adriano dos Santos Fernandes (JIRA)
Date-time parsing is very weak -- Key: CORE-5750 URL: http://tracker.firebirdsql.org/browse/CORE-5750 Project: Firebird Core Issue Type: Bug Reporter: Adriano dos Santos Fernandes Firebird date-time

Re: [Firebird-devel] Crash Firebird 2.5.8 Embedded with Firebird Ado.net provider.

2018-02-07 Thread Adriano dos Santos Fernandes
On 07/02/2018 10:17, Mark Rotteveel wrote: > > But what causes the observed difference between the example table that > only has an integer id column (and doesn't trigger the AV), and the > one that also has a varchar column and an expression index > (lower(title))? > probably loading of library

Re: [Firebird-devel] DEC_FIXED implementation, Decimal128 is unscaled?

2018-02-01 Thread Adriano dos Santos Fernandes
On 01/02/2018 14:04, Mark Rotteveel wrote: > On 1-2-2018 16:30, Alex Peshkoff via Firebird-devel wrote: >>> Point taken, but my suggestion was more that we now don't utilize >>> the Decimal128 to its fullest for decimal, and users of the direct >>> API now need to handle decfloat and decimal(19+,

Re: [Firebird-devel] Current state of DECFLOAT in Firebird 4

2018-01-21 Thread Adriano dos Santos Fernandes
8. Saw that change domains/columns types between others types and decfloat in DDL is not handled and produces assertions (DdlNodes.epp). Adriano -- Check out the vibrant tech community on one of the world's most

[Firebird-devel] [FB-Tracker] Created: (CORE-5717) Reject non-constant date/time/timestamp literals

2018-01-19 Thread Adriano dos Santos Fernandes (JIRA)
Reporter: Adriano dos Santos Fernandes There is date, time and timestamp literals with this syntax: DATE '2018-01-01' TIME '10:00:00' TIMESTAMP '2018-01-01 10:00:00' They are parsed at compile time. However, there are weird situation with some literals. We may use things as DATE 'TODAY

Re: [Firebird-devel] Firebird 3 and ICU

2018-01-19 Thread Adriano dos Santos Fernandes
On 19/01/2018 07:14, Roman Simakov wrote: > Hello! > > It seems that we have a problem with installation of Firebird 3 on > OpenSuse. I get "Could not find acceptable ICU library". > > I took a look into sources. FB tries to search ICU modules in some > magic manner combining major and minor

[Firebird-devel] Unnecessary pass sorting INTL_DATA

2018-01-18 Thread Adriano dos Santos Fernandes
Hi! Most of types generates reversible sort keys, so only key is written in sort blocks and data is regenerated from it. INTL strings (IS_INTL_DATA) does not generate reversible sort keys, so original data is also written. I think there is an unnecessary pass for them, there is no need to

[Firebird-devel] SKD_time / SKD_timestamp

2018-01-18 Thread Adriano dos Santos Fernandes
Hi! In little endian version of Sort::diddleKey:         case SKD_timestamp:         case SKD_sql_time:         case SKD_sql_date:             p[3] ^= 1 << 7;             break; How can this be correct for time or timestamp? As a timestamp consists of a date and a time, and a time (alone) has

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Adriano dos Santos Fernandes
On 18/01/2018 07:37, Dmitry Yemanov wrote: > > By design, these hardcoded strings are expressions, but > date/time/timestamp prefixes imply literals (by standard). I'd rather > suggest to validate the string at compile time and throw a misuse error. This is ok for me too. Adriano

[Firebird-devel] Weird date/time literals

2018-01-17 Thread Adriano dos Santos Fernandes
Hi! I don't known a reason, but I feel that very few people uses date/time (and timestamp) literals. In Firebird generally people use casts to transform a string to these types. In Oracle, they use TO_DATE. It's much better to use DATE '2018-01-01', TIME '10:00:00' and TIMESTAMP '2018-01-01

Re: [Firebird-devel] ISQL open unassigned issues

2018-01-17 Thread Adriano dos Santos Fernandes
On 17/01/2018 07:31, Mark Rotteveel wrote: > >> While you say "were having issues" and type is set to "Bug" (even with >> priority Major), it definitely feels like a pure feature request to me. > > I disagree, I think it is a bug, and priority Major is the default > when creating a ticket in the

Re: [Firebird-devel] where is ':' valid in Firebird SQL?

2018-01-03 Thread Adriano dos Santos Fernandes
On 03/01/2018 03:57, Lionel Elie Mamane wrote: > Hi, > > Where is ':' a valid character in Firebird SQL? In particular, is it > ever valid outside of "-delimited identifiers and '-delimited strings? > > Context: In the LibreOffice integration of Firebird, we would like to > allow users to use

Re: [Firebird-devel] Memory leak - How can I provide information about it?

2017-12-15 Thread Adriano dos Santos Fernandes
On 15/12/2017 07:03, Vlad Khorsun via Firebird-devel wrote: > 15.12.2017 10:45, liviuslivius wrote: >> Hi Vlad, >> >> >> "This temporary blobs could be released on commit (rollback) only" >> >> just curious, why it can not be released after it is used? > >   When its become unused ? That blobs

Re: [Firebird-devel] Support for timed-zones datatypes

2017-12-14 Thread Adriano dos Santos Fernandes
Em 14/12/2017 14:14, Leyne, Sean escreveu: > > Separately, consider that calendar applications exchange times using UTC > offset contexts not time zone/region names. Why? Local Timezone UTC offsets > and DST rules are *variable*, UTC offsets are not. > It's stored normalized to UTC, but the

Re: [Firebird-devel] Support for timed-zones datatypes

2017-12-13 Thread Adriano dos Santos Fernandes
On 13/12/2017 15:20, Leyne, Sean wrote: >> I must agree with Lester. Initially I want to only implement offsets, but >> testing Oracle, PostgreSQL and reading the standard, I think offsets are >> useless for almost everything. > I don't agree, offsets are the appropriate for all but boundary cases

Re: [Firebird-devel] Memory leak - How can I provide information about it?

2017-12-12 Thread Adriano dos Santos Fernandes
On 12/12/2017 15:38, Gabor Boros wrote: > 2017. 12. 12. 17:34 keltezéssel, Adriano dos Santos Fernandes írta: > >> Can you make this leaks using only ISQL? >> >> 1) Running the SELECT statement one after another > > > If run the next SELECT 5 times I get the be

Re: [Firebird-devel] Support for timed-zones datatypes

2017-12-12 Thread Adriano dos Santos Fernandes
On 12/12/2017 13:42, Lester Caine wrote: > and it's the version data that is missing in the Oracle 'solution' ... It's not that simple. Date/times are considered equal if their conversion to UTC are equal, independent of region. So, they are converted to UTC for storage. To convert to UTC, one

Re: [Firebird-devel] Support for timed-zones datatypes

2017-12-12 Thread Adriano dos Santos Fernandes
On 12/12/2017 13:20, Alex Peshkoff via Firebird-devel wrote: > On 12/12/17 17:57, Adriano dos Santos Fernandes wrote: >> Oracle also mentions inconsistency that may happen when the time zone >> database is updated. If user had previously entered a time in a moment >> that sub

Re: [Firebird-devel] Memory leak - How can I provide information about it?

2017-12-10 Thread Adriano dos Santos Fernandes
Em 10/12/2017 11:08, Gabor Boros escreveu: > 2017. 12. 10. 12:29 keltezéssel, Adriano dos Santos Fernandes írta: >> How can you order by a blob? It's an error anyway. > > For example: > SELECT * FROM TABLE1 ORDER BY (CAST(SUBSTRING(TABLE1.TEXT_BLOB_FIELD > FROM 1 FOR 40) AS V

Re: [Firebird-devel] Memory leak - How can I provide information about it?

2017-12-10 Thread Adriano dos Santos Fernandes
How can you order by a blob? It's an error anyway. Adriano Em 8 de dez de 2017 7:09 PM, "Gabor Boros" escreveu: > Hi All, > > I experiencing a memory leak but cannot attach the database nor the > application. It is easy to reproduce with the application. Just change the >

Re: [Firebird-devel] Support for timed-zones datatypes

2017-11-21 Thread Adriano dos Santos Fernandes
On 21/11/2017 14:42, Mark Rotteveel wrote: > > If you need that, you also need to store the actual timezone > somewhere. PostgreSQL for example also uses an offset for timestamp > with timezone (not sure if that is required by SQL standard though). > Each "TIMESTAMP-TZ" has a hour/minute offset

Re: [Firebird-devel] Support for timed-zones datatypes

2017-11-21 Thread Adriano dos Santos Fernandes
On 21/11/2017 14:16, Lester Caine wrote: > On 21/11/17 14:55, Adriano dos Santos Fernandes wrote: >> Implementing TIME WITH TIME ZONE and TIMESTAMP WITH TIME ZONE datatypes >> as specified in the SQL standard is not a big problem. > The only question is just how is the tim

Re: [Firebird-devel] Support for timed-zones datatypes

2017-11-21 Thread Adriano dos Santos Fernandes
On 21/11/2017 13:56, Dmitry Yemanov wrote: > 21.11.2017 17:55, Adriano dos Santos Fernandes wrote: >> >> Implementing TIME WITH TIME ZONE and TIMESTAMP WITH TIME ZONE datatypes >> as specified in the SQL standard is not a big problem. >> >> However

[Firebird-devel] Support for timed-zones datatypes

2017-11-21 Thread Adriano dos Santos Fernandes
Hi! Implementing TIME WITH TIME ZONE and TIMESTAMP WITH TIME ZONE datatypes as specified in the SQL standard is not a big problem. However, standard says that CURRENT_TIME / CURRENT_TIMESTAMP returns the timed-zone datatype. That causes two problems: - Internally (say in PSQL), conversion to

Re: [Firebird-devel] Splitting out sub projects in extern

2017-11-17 Thread Adriano dos Santos Fernandes
On 17/11/2017 08:21, marius adrian popa wrote: > Now i see that is used also for node-firebird-native-api generating > json and that is cool  > > https://github.com/asfernandes/node-firebird-native-api/blob/master/src/generate-files/firebird.cloop.json > > And there is another project that

Re: [Firebird-devel] Splitting out sub projects in extern

2017-11-17 Thread Adriano dos Santos Fernandes
On 16/11/2017 23:54, William L. Thomson Jr. wrote: > On Thu, 16 Nov 2017 22:30:25 -0200 > Adriano dos Santos Fernandes <adrian...@gmail.com> wrote: > >> Em 16/11/2017 14:47, William L. Thomson Jr. escreveu: >>> I understand for various reasons why there are pack

Re: [Firebird-devel] Splitting out sub projects in extern

2017-11-16 Thread Adriano dos Santos Fernandes
Em 16/11/2017 14:47, William L. Thomson Jr. escreveu: > I understand for various reasons why there are packages shipped with > Firebird sources used as part of its build, residing in extern folder. > A not good thing, a choice among others not good things. Life is not perfect. > My plan for

[Firebird-devel] [FB-Tracker] Created: (CORE-5646) Parse error when compiling a statement causes memory leak until attachment is disconnected

2017-10-20 Thread Adriano dos Santos Fernandes (JIRA)
Project: Firebird Core Issue Type: Bug Affects Versions: 4.0 Alpha 1, 3.0.2 Reporter: Adriano dos Santos Fernandes Before statement is compiled, a memory pool is created and registered in the attachment. If statement has error, this pool is only immediatelly destroyed

Re: [Firebird-devel] FB 3.0 Replacing ICU libraries on Windows

2017-10-13 Thread Adriano dos Santos Fernandes
On 13/10/2017 13:28, Magnus Johansson wrote: > -Original Message- > From: Adriano dos Santos Fernandes [mailto:adrian...@gmail.com] > Sent: Friday, October 13, 2017 6:11 PM > To: firebird-devel@lists.sourceforge.net > Subject: Re: [Firebird-devel] FB 3.0 Replacing ICU libra

Re: [Firebird-devel] FB 3.0 Replacing ICU libraries on Windows

2017-10-13 Thread Adriano dos Santos Fernandes
On 12/10/2017 13:49, Vlad Khorsun via Firebird-devel wrote: > 12.09.2017 15:33, Adriano dos Santos Fernandes wrote: >> On 12/09/2017 08:46, Magnus Johansson wrote: > ... >>>    SELECT FIELD_UTF_SV_CI_NUM >>> FROM   TABLE_T >>> WHERE  FIELD_UTF_SV_C

Re: [Firebird-devel] Visual Studio 2017 Version 15.4 Released

2017-10-13 Thread Adriano dos Santos Fernandes
On 12/10/2017 05:12, marius adrian popa wrote: > You can now use CMake for Linux C++ development in Visual Studio > > > That could be interesting in cross compiling Firebird from Windows > side to Linux/WSL > >

Re: [Firebird-devel] Using ordinary database connection string in isc_service_attach() call

2017-10-11 Thread Adriano dos Santos Fernandes
On 11/10/2017 15:09, Dimitry Sibiryakov wrote: > >   Compare this: > > fbsvcmgr host:service_mgr user sysdba password xxx expected_db > employee action_db_stats dbname employee > >   and this: > > fbsvcmgr host:employee user sysdba password xxx action_db_stats > >   What is "more complex and

[Firebird-devel] Test - please ignore

2017-09-27 Thread Adriano dos Santos Fernandes
. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at

[Firebird-devel] [FB-Tracker] Created: (CORE-5620) Add builtin functions LAST_DAY and FIRST_DAY

2017-09-21 Thread Adriano dos Santos Fernandes (JIRA)
Reporter: Adriano dos Santos Fernandes Firebird lacks very commonly used functions to manage dates. They can be added as UDF or PSQL functions, but since they're very common and need to be registered in every database it would be good to have them as bultin functions. I suggest these two

Re: [Firebird-devel] FB 3.0 Replacing ICU libraries on Windows

2017-09-12 Thread Adriano dos Santos Fernandes
On 12/09/2017 08:46, Magnus Johansson wrote: > > After I replaced the ICU libraries as described before, I created a database, > some collations and a table with some data: ... > > > CREATE COLLATION ISO_SV_CI >FOR ISO8859_1 >FROM SV_SV >CASE INSENSITIVE; This has

Re: [Firebird-devel] FB 3.0 Replacing ICU libraries on Windows

2017-09-12 Thread Adriano dos Santos Fernandes
On 12/09/2017 08:10, Magnus Johansson wrote: > > But when testing, the result is not as expected. > > It will be difficult to help you with this problem description. Adriano -- Check out the vibrant tech community on

Re: [Firebird-devel] Problem in Windows zip kits

2017-08-28 Thread Adriano dos Santos Fernandes
On 28/08/2017 08:34, Paul Reeves wrote: > On Sat, 26 Aug 2017 19:04:28 -0300 Adriano dos Santos Fernandes wrote > >> Hi! >> >> I found two problems with include files: >> >> - ibase.h has #include "consts_pub.h" > I can't find that line. I di

[Firebird-devel] [FB-Tracker] Created: (CORE-5599) Problems with include files in Windows packages

2017-08-27 Thread Adriano dos Santos Fernandes (JIRA)
Affects Versions: 3.0.2 Environment: Windows Reporter: Adriano dos Santos Fernandes There are two problems with include files in Windows zip kit (I did not tested the exe installer): - ibase.h has #include "consts_pub.h" - include/firebird/impl

[Firebird-devel] Problem in Windows zip kits

2017-08-26 Thread Adriano dos Santos Fernandes
Hi! I found two problems with include files: - ibase.h has #include "consts_pub.h" - include/firebird/impl is not included Adriano -- Check out the vibrant tech community on one of the world's most engaging tech

Re: [Firebird-devel] Firebird 3, stored procs and plans

2017-08-25 Thread Adriano dos Santos Fernandes
On 25/08/2017 11:06, Paul Reeves wrote: > On Fri, 25 Aug 2017 14:00:03 +0300 Dmitry Yemanov wrote > >>> But whatever happened to the SP debugger? >> AFAIK, it was never started (although was discussed a bit). >> > And while on the subject of a debugger for SPs... > > There are commercial Stored

Re: [Firebird-devel] Useful SQL Stored Procedures as part of standard firebird installation

2017-08-14 Thread Adriano dos Santos Fernandes
On 14/08/2017 05:16, Paul Reeves wrote: > >> 2. What prefix do you prefer for this? >> >> I prefer LIB$, like LIB$CheckTriggerUniquePostion. >> >> Any other idea? > That could work. Does anyone else have any thoughts on this? > > My opinion is to forget FB 2.5 and create a package instead of

Re: [Firebird-devel] Charset in IExternalProcedureImpl

2017-08-01 Thread Adriano dos Santos Fernandes
On 01/08/2017 02:52, Jiří Činčura wrote: >> This method changes the connection charset whiling the execute/open >> method is in progress. > What is this good for? > When an attachment runs external code, it may be in three different "states": - User (client) code (PSQL / SQL) - Plugin

Re: [Firebird-devel] Bytes per character for given charset

2017-08-01 Thread Adriano dos Santos Fernandes
On 01/08/2017 14:15, Jiří Činčura wrote: > Hi *, > > Can I *easily* get number of bytes per character for given character > set ID in external engine? > With API functions, no. Only running a query. Adriano -- Check

Re: [Firebird-devel] Charset in IExternalProcedureImpl

2017-07-31 Thread Adriano dos Santos Fernandes
On 27/07/2017 03:01, Jiří Činčura wrote: > Looks like it has no effect, though it is called. Using WIN1250 there > and I'm still getting the varchars in UTF-8 (connection charset). So > it probably has different purpose? > > This method changes the connection charset whiling the execute/open

Re: [Firebird-devel] FB3 ICU (v52)

2017-07-23 Thread Adriano dos Santos Fernandes
Em 21/07/2017 15:09, Kovalenko Dmitry escreveu: > Adriano, could you upload to https://github.com/FirebirdSQL the source > code of ICU from FB3? > Sources were not changed. Description of build process (which is manual, not scripted) is described here:

[Firebird-devel] [FB-Tracker] Reopened: (CORE-5570) Negative infinity (double) shown incorrectly without sign in isql

2017-07-21 Thread Adriano dos Santos Fernandes (JIRA)
[ http://tracker.firebirdsql.org/browse/CORE-5570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adriano dos Santos Fernandes reopened CORE-5570: Fix Version/s: (was: 4.0 Alpha 1

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-21 Thread Adriano dos Santos Fernandes
On 21/07/2017 08:00, Alex via Firebird-devel wrote: >>> >> Mark, this is interesting. I know bcrypt is very used by nodejs/expess >> people and I even used it myself. >> >> But what is more interesting, isn't Firebird still using these "not >> suitable for passwords" hashes in recent versions? >>

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-21 Thread Adriano dos Santos Fernandes
On 19/07/2017 15:51, Mark Rotteveel wrote: > >> >> In most cases original string (password) is not even stored and hashes >> are used to check if a password matches a previously one. > > The proposed hashes are **not** suitable for passwords; you shouldn't > use a pure cryptographic hash for

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-19 Thread Adriano dos Santos Fernandes
On 19/07/2017 16:48, Mark Rotteveel wrote: > >> If we are not going to use hash plugins I'd vote for this syntax. > > I don't think this solution/syntax would disallow the possibility to > handle this through plugins. > You are right. Algorithm name is a recognized at prepare time. It can be

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-19 Thread Adriano dos Santos Fernandes
On 19/07/2017 15:42, Mark Rotteveel wrote: > >> HASH(X USING MD5) is self-documentary as well. > > Yes, it does improve readability. > > BTW: can I assume the hash functions will be binary (use OCTETS), and > not hex encoded values? > Yes! Adriano

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-19 Thread Adriano dos Santos Fernandes
On 19/07/2017 02:29, Dmitry Yemanov wrote: > 19.07.2017 01:32, Adriano dos Santos Fernandes wrote: >> >>> >>>Algorithm name could define result length. >> >> Yes, for constants. > > We need to decide whether the algorithm name can be passed d

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-19 Thread Adriano dos Santos Fernandes
On 19/07/2017 05:27, Dimitry Sibiryakov wrote: > 19.07.2017 2:47, Adriano dos Santos Fernandes wrote: >> They will store hash on field of appropriate length for the given hash >> and index it. > > On contrary, there is no point to store hash value if its purpose is >

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-18 Thread Adriano dos Santos Fernandes
Em 18/07/2017 16:58, Dimitry Sibiryakov escreveu: > 18.07.2017 21:52, Adriano dos Santos Fernandes wrote: >> It will be described as VARCHAR, so real length depends on the algorithm >> used by the user. > > Index is built on full data length, not real one. > People wil

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-18 Thread Adriano dos Santos Fernandes
Em 18/07/2017 17:35, Vlad Khorsun via Firebird-devel escreveu: > > Algorithm name could define result length. Yes, for constants. > If alg name is passed as > parameter, we could use maximum known length (of all known algs) at > prepare time. > Maximum known length means if a new

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-18 Thread Adriano dos Santos Fernandes
On 18/07/2017 16:32, Dmitry Yemanov wrote: > > >> When two parameters are passed, it will return a VARCHAR(64) CHARACTER >> SET OCTETS. That's sufficient for a SHA-256, for example. > > Would it make sense to reserve more bytes, 256 or 1024 octets for > example? Just to avoid extending the result

Re: [Firebird-devel] HASH function (CORE-4436)

2017-07-18 Thread Adriano dos Santos Fernandes
On 18/07/2017 16:34, Dmitry Yemanov wrote: > 18.07.2017 22:00, Leyne, Sean wrote: >> >> Would this approach have any performance advantages over using UDFs? > > People hate writing UDFs for common tasks. And IMHO getting a robust > hash belongs to this category. > Moreover, we already have HASH

[Firebird-devel] HASH function (CORE-4436)

2017-07-18 Thread Adriano dos Santos Fernandes
Hi! We have HASH function that returns a 64 bit integer. The algorithm is bad and the result too small for a hash. I propose to extend the same function with a second parameter with the algorithm name. When only one parameter is passed, things works as now. When two parameters are passed, it

Re: [Firebird-devel] Removal of whitespace in changelog and readme

2017-07-17 Thread Adriano dos Santos Fernandes
On 17/07/2017 04:48, Mark Rotteveel wrote: > Double whitespace at the end of a line has meaning in markdown: it > introduces an explicit linebreak, otherwise the linebreak is just > non-linebreak whitespace when rendered. I was not aware about this. :( These spaces were causing troubles to me

[Firebird-devel] PORT_symmetric

2017-07-13 Thread Adriano dos Santos Fernandes
Hi! When client and server "architecture" are identical, remote code set PORT_symmetric flag and that causes some optimizations. But, architectures are: #if defined(__sun) # ifdef sparc const P_ARCH ARCHITECTURE = arch_sun4; #elif (defined i386 || defined AMD64) const P_ARCH

[Firebird-devel] Utility to debug/understand FB wire protocol

2017-07-12 Thread Adriano dos Santos Fernandes
Hi! It's common to see in this list questions about the remote protocol, so here is a good utility which may be unknown from you guys: https://github.com/nakagami/pyfirebirdsql/blob/master/misc/fbproxy.py This file works independently from the project, just run it with python. Adriano

[Firebird-devel] [FB-Tracker] Created: (CORE-5580) Signature of packaged functions is not checked for mismatch with [NOT] DETERMINISTIC attribute

2017-07-11 Thread Adriano dos Santos Fernandes (JIRA)
Project: Firebird Core Issue Type: Bug Affects Versions: 3.0.2, 4.0 Initial Reporter: Adriano dos Santos Fernandes Test case: recreate package pk1 as begin function f1(c varchar(10)) returns varchar(10) deterministic; end! recreate package body pk1 as begin

Re: [Firebird-devel] Result set from where afield = afield

2017-07-10 Thread Adriano dos Santos Fernandes
On 10/07/2017 09:11, Paul Reeves wrote: > While I was studying this sort of query: > > SELECT * FROM employee e > WHERE e.EMP_NO = coalesce ( ?, e.EMP_NO) > > it became obvious that if the parameter is null it resolves to this > sort of query: > > SELECT * FROM employee e > WHERE

Re: [Firebird-devel] Optimisation of where afield = coalesce(value1, value2 )

2017-07-07 Thread Adriano dos Santos Fernandes
On 07/07/2017 12:19, Dmitry Yemanov wrote: > 07.07.2017 18:12, Dimitry Sibiryakov wrote: >> >> In this particular case it is enough to know parameter value to >> choose plan. Parameters are known before reading table. > > True, but our optimizer is developed for generic cases, not such > specific

Re: [Firebird-devel] Optimisation of where afield = coalesce(value1, value2 )

2017-07-07 Thread Adriano dos Santos Fernandes
On 07/07/2017 11:19, Paul Reeves wrote: > Given this simple SQL statement > > select e.emp_no, e.full_name > from employee e > where e.emp_no = coalesce(value1,value2 ) > > the plan varies depending on the following : > > 1. where e.EMP_NO = COALESCE(?, ? ) -- PLAN (E INDEX (RDB$PRIMARY7))

Re: [Firebird-devel] udrcpp_example

2017-07-06 Thread Adriano dos Santos Fernandes
On 06/07/2017 08:27, Paul Reeves wrote: > They both compile under MSVC10. I tested with 32 and 64-bit. > > Thanks. I committed the fix. Adriano -- Check out the vibrant tech community on one of the world's most

<    3   4   5   6   7   8   9   10   11   12   >