• Re: [Info-ingres] The 'is ingresdate' predicate and II_DATE_FORMAT

    From Martin Bowes@martin.bowes@ndph.ox.ac.uk to info-ingres@lists.planetingres.org on Tue Apr 6 09:52:11 2021
    From Newsgroup: comp.databases.ingres

    Hi Karl,

    If they have fins, do they even have toes?

    This is sounding more like an issue I'll raise to seek clarification.

    Marty

    -----Original Message-----
    From: Karl Schendel <schendel@kbcomputer.com>
    Sent: 06 April 2021 10:37
    To: Martin Bowes <martin.bowes@ndph.ox.ac.uk>
    Subject: Re: [Info-ingres] The 'is ingresdate' predicate and II_DATE_FORMAT

    Marty, you're looking for consistency. Ok,

    But wait. You asked for Sweden date format and it told you Finland.
    That should have been your first hint...those Finns can't be trusted to count their toes...

    (and if you pretend that anyone from Actian answered you, see trump, matt gaetz, etc etc!)

    Karl


    On Apr 6, 2021, at 3:23 AM, Martin Bowes <martin.bowes@ndph.ox.ac.uk> wrote:

    Hi All,

    In my innocence I assumed that the rCyis ingresdaterCO predicate would work using the current session setting of II_DATE_FORMAT. That variable can after all be set locally to override the global setting used in the installation. Given that many input date formats are valid in some settings but not in others, using the session setting makes sense to me.

    So for example my installation has II_DATE_FORMAT=multinational4. So todays date would be generated as rCy06/04/2021rCO

    ButrCa
    EXPORT II_DATE_FORMAT=SWEDEN
    sql iidbdb <<SQL_END
    select dbmsinfo(rCydate_formatrCO); roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roefinland roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    select date('today')\g roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roe2021-04-06 roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    (1 row)
    select case when '2021-04-06' is ingresdate then 'valid' else
    'invalid' end\g roiroCroCroCroCroCroCroCroE
    roecol1 roe
    roLroCroCroCroCroCroCroCron
    roeinvalidroe |f Well thatrCOs a bit of a shock.
    rooroCroCroCroCroCroCroCroy
    (1 row)
    select case when '06/04/2021' is ingresdate then 'valid' else
    'invalid' end roiroCroCroCroCroCroCroCroE
    roecol1 roe
    roLroCroCroCroCroCroCroCron
    roevalid roe|f This is correct, as that date string is valid date input in Sweden rooroCroCroCroCroCroCroCroy
    (1 row)

    So is the rCyis ingresdaterCO predicate only respecting the installation wide setting of II_DATE_FORMAT or is this a bug in the processing?

    Note IrCOve tried the above using the set date_format rCyswedenrCO command with the same result.

    Martin Bowes
    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Steve@s.anderson.au@gmail.com to comp.databases.ingres on Wed Apr 14 20:30:21 2021
    From Newsgroup: comp.databases.ingres

    On Tuesday, April 6, 2021 at 5:24:10 PM UTC+10, Martin Bowes wrote:
    Hi All,
    In my innocence I assumed that the rCyis ingresdaterCO predicate would work using the current session setting of II_DATE_FORMAT. That variable can after all be set locally to override the global setting used in the installation. Given that many input date formats are valid in some settings but not in others, using the session setting makes sense to me.
    So for example my installation has II_DATE_FORMAT=multinational4. So todays date would be generated as rCy06/04/2021rCO
    ButrCa
    EXPORT II_DATE_FORMAT=SWEDEN
    sql iidbdb <<SQL_END
    select dbmsinfo(rCydate_formatrCO); roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roefinland roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    select date('today')\g roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roe2021-04-06 roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    (1 row)
    select case when '2021-04-06' is ingresdate then 'valid' else 'invalid' end\g roiroCroCroCroCroCroCroCroE
    roecol1 roe
    roLroCroCroCroCroCroCroCron
    roeinvalidroe |f Well thatrCOs a bit of a shock.
    rooroCroCroCroCroCroCroCroy
    (1 row)
    select case when '06/04/2021' is ingresdate then 'valid' else 'invalid' end roiroCroCroCroCroCroCroCroE
    roecol1 roe
    roLroCroCroCroCroCroCroCron
    roevalid roe|f This is correct, as that date string is valid date input in Sweden
    rooroCroCroCroCroCroCroCroy
    (1 row)
    So is the rCyis ingresdaterCO predicate only respecting the installation wide setting of II_DATE_FORMAT or is this a bug in the processing?
    Note IrCOve tried the above using the set date_format rCyswedenrCO command with the same result.
    Martin Bowes

    Hi Martin

    I can't answer your question, but where I currently work it always take me a couple of goes to get the date literals right when running adhoc queries (which I put down to user error). I don't recall having this problem in the past and we're not using anything as exotic as Swedish or Finnish date formats.

    Steve


    --- Synchronet 3.21b-Linux NewsLink 1.2