• Is my Ingres server running on Windows?

    From Roy Hann@specially@processed.almost.meat to comp.databases.ingres on Mon Sep 4 13:48:07 2023
    From Newsgroup: comp.databases.ingres

    Short of querying ima_version, or parsing the _version() string, or
    similar antics, is there a convenient way to tell if my application is connected to Ingres running on Windows?

    Clearly I am hoping for something like dbmsinfo('platform')...

    Roy
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From chris.cla...@gmail.com@chris.clark.actian@gmail.com to comp.databases.ingres on Mon Sep 4 20:03:14 2023
    From Newsgroup: comp.databases.ingres

    On Monday, September 4, 2023 at 6:48:09rC>AM UTC-7, Roy Hann wrote:
    Short of querying ima_version, or parsing the _version() string, or
    similar antics, is there a convenient way to tell if my application is connected to Ingres running on Windows?

    Clearly I am hoping for something like dbmsinfo('platform')...
    I can't think of anything off the top of my head. If it were me, I'd use dbmsinfo('_version'). If you want to avoid that then you could look at port numbers in IMA for (say) the GCN. Windows uses pipes, most installations on Unix are tcp/ip sockets (rather than domain/file sockets), so if you can't successfully cast to an integer its **probably** Windows (or VMS).
    The other option might be to poke around locations paths, but again for me version string would be my goto solution.
    Out of curiosity, what sort of decisions to you want to make once you have this determined in the application?
    Chris
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Roy Hann@specially@processed.almost.meat to comp.databases.ingres on Tue Sep 5 08:54:48 2023
    From Newsgroup: comp.databases.ingres

    chris.cla...@gmail.com wrote:

    On Monday, September 4, 2023 at 6:48:09rC>AM UTC-7, Roy Hann wrote:
    Short of querying ima_version, or parsing the _version() string, or
    similar antics, is there a convenient way to tell if my application is
    connected to Ingres running on Windows?

    Clearly I am hoping for something like dbmsinfo('platform')...

    [snip]

    Out of curiosity, what sort of decisions to you want to make once you
    have this determined in the application?

    I want to know what kind of UUID I'm getting back from

    SELECT uuid()

    On a 'nix I'll get a Type-1 UUID; on Windows I'll get a Type-4 and the human-readable representation will be scrambled (seemingly because it's ignoring endian-ness): e.g. 4dbbb0f1-e68d-834a-8e47-359b73beb840.
    According to me that -834a- bit should be -4a83-.

    If I know the UUID is coming from Windows I can select hex(uuid()) and
    format it correctly myself.

    The formatting is my issue; I don't care that the two versions return
    different types of UUID--though I can't imagine it's desirable.

    Roy


    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Sarkaut Mohn@sarkaut.mohn%actian.com@gtempaccount.com to comp.databases.ingres on Wed Sep 6 04:48:41 2023
    From Newsgroup: comp.databases.ingres

    Roy Hann schrieb am Dienstag, 5. September 2023 um 10:54:50 UTC+2:
    chris.cla...@gmail.com wrote:

    On Monday, September 4, 2023 at 6:48:09rC>AM UTC-7, Roy Hann wrote:
    Short of querying ima_version, or parsing the _version() string, or
    similar antics, is there a convenient way to tell if my application is
    connected to Ingres running on Windows?

    Clearly I am hoping for something like dbmsinfo('platform')...
    [snip]

    Out of curiosity, what sort of decisions to you want to make once you
    have this determined in the application?
    I want to know what kind of UUID I'm getting back from

    SELECT uuid()

    On a 'nix I'll get a Type-1 UUID; on Windows I'll get a Type-4 and the human-readable representation will be scrambled (seemingly because it's ignoring endian-ness): e.g. 4dbbb0f1-e68d-834a-8e47-359b73beb840.
    According to me that -834a- bit should be -4a83-.

    If I know the UUID is coming from Windows I can select hex(uuid()) and format it correctly myself.

    The formatting is my issue; I don't care that the two versions return different types of UUID--though I can't imagine it's desirable.

    Roy
    If you wanted to get v1 UUID on Windows, you can use II_UUID_MAC set to TRUE. On Windows, Ingres runs the OS function UuidCreate which generates v4 UUIDs. With II_UUID_MAC=TRUE, Ingres uses OS function UuidCreateSequential which generates v1 UUIDs. On Linux, Ingres uses an own customized code and generates v1 UUIDs.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Roy Hann@specially@processed.almost.meat to comp.databases.ingres on Wed Sep 6 12:45:47 2023
    From Newsgroup: comp.databases.ingres

    Sarkaut Mohn wrote:

    Roy Hann schrieb am Dienstag, 5. September 2023 um 10:54:50 UTC+2:
    chris.cla...@gmail.com wrote:

    On Monday, September 4, 2023 at 6:48:09rC>AM UTC-7, Roy Hann wrote:
    Short of querying ima_version, or parsing the _version() string, or
    similar antics, is there a convenient way to tell if my application is >> >> connected to Ingres running on Windows?

    Clearly I am hoping for something like dbmsinfo('platform')...
    [snip]

    Out of curiosity, what sort of decisions to you want to make once you
    have this determined in the application?
    I want to know what kind of UUID I'm getting back from

    SELECT uuid()

    On a 'nix I'll get a Type-1 UUID; on Windows I'll get a Type-4 and the
    human-readable representation will be scrambled (seemingly because it's
    ignoring endian-ness): e.g. 4dbbb0f1-e68d-834a-8e47-359b73beb840.
    According to me that -834a- bit should be -4a83-.

    If I know the UUID is coming from Windows I can select hex(uuid()) and
    format it correctly myself.

    The formatting is my issue; I don't care that the two versions return
    different types of UUID--though I can't imagine it's desirable.

    If you wanted to get v1 UUID on Windows, you can use II_UUID_MAC set to TRUE. On Windows, Ingres runs the OS function UuidCreate which generates v4 UUIDs. With II_UUID_MAC=TRUE, Ingres uses OS function UuidCreateSequential
    which generates v1 UUIDs. On Linux, Ingres uses an own customized code
    and generates v1 UUIDs.

    Ah-hah! I did not know about that. Thank you.

    There is still the problem that on Windows the human-readble
    representation is garbled though.

    As for my original question: I've resigned myself to looking for "win"
    in the _version() string. It's not very horrible.

    Roy

    --- Synchronet 3.21b-Linux NewsLink 1.2