Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chris Cranford
    @Naros
    I'm wondering if it makes sense to detect this and either a) log a warning or b) throw an exception if this won't ever be supported.
    Dave Cramer
    @davecramer
    There was a recent email on hackers regarding this
    I'm looking for it
    Dave Cramer
    @davecramer
    for some reason I can't find it. However the problem will be how deep in the nest would we go.
    I'm fine with 1 deep in the domain, after that tho...
    Chris Cranford
    @Naros
    That's fine, we can document that as a limitation at least. I honestly don't know how widely used are nested UDTs
    Dave Cramer
    @davecramer
    probably less so with json now
    Chris Cranford
    @Naros
    K
    Dave Cramer
    @davecramer
    works with simple domains
    in theory we could recurse them
    although I'd probably like to write a function for that
    Chris Cranford
    @Naros
    @davecramer :thumbsup:
    Dave Cramer
    @davecramer
    @Naros do you have any examples of types based on enums?
    Dave Cramer
    @davecramer
    curious to see how pglogical would deal with this
    give me a bit
    Dave Cramer
    @davecramer
    hmmm enum's are much tougher to handle. since what is really in the column is an oid which represents the value.
    Chris Cranford
    @Naros
    @davecramer I noticed you merged the PR for #1605, I just pulled down the code and build the driver but so far it does not seem to be working afaict.
    CREATE DOMAIN varbit2 AS varbit(3) still returns 2147483647 rather than 3. Did I misunderstand the fix?
    Dave Cramer
    @davecramer
    hmmm really? I thought I put a test case in there that proved that it worked
    @Naros assertEquals("v", rs.getString("COLUMN_NAME"));
    assertEquals(3, rs.getInt("COLUMN_SIZE"));
    Chris Cranford
    @Naros
    @davecramer sorry for the noise, I must have thought I ran a pull but apparently only ran a fetch before building.
    Dave Cramer
    @davecramer
    whew you had me worried
    Chris Cranford
    @Naros
    For recursive support, e.g. CREATE DOMAIN varbit2 as varbit(3); CREATE DOMAIN varbit2b AS varbit2; ... Is that something you decided against for now?
    I just need ot update the issue/documentation accordingly. AFAICT that scenario isn't supported in the fix .
    Dave Cramer
    @davecramer
    for now yes. Not sure how far down the rabbit hole we want to recurse.
    Chris Cranford
    @Naros
    @davecramer I think I might have found a bug with the PR, specifically this use case of CREATE DOMAIN float83 AS NUMERIC(8,3) DEFAULT 0.0;
    I see the column metadata reports the column's length as 524295 rather than 8.
    Dave Cramer
    @davecramer
    interesting
    Chris Cranford
    @Naros
    fwiw 524295 is the typtypmod value for that domain type in pg_type.
    Dave Cramer
    @davecramer
    select typname, typtypmod from pg_type where typname like 'float83';
    typname | typtypmod
    ---------+-----------
    float83 | 524295
    ya saw that
    Chris Cranford
    @Naros
    Exactly, I would have expected length to be 8 and scale to be 3 here.
    Dave Cramer
    @davecramer
    precision = (typmod >> 16) & 0xffff;
    scale = typmod & 0xffff;
    typmod depends on the type
    not always set to length
    Dave Cramer
    @davecramer
    ok, I think this is an easy fix
    Chris Cranford
    @Naros
    k
    Dave Cramer
    @davecramer
    Chris Cranford
    @Naros
    @davecramer Awesome, I'll integrate that into my local copy and build & test it.
    Dave Cramer
    @davecramer
    ty
    Chris Cranford
    @Naros
    @davecramer As mentioned in the Debezium channel, I've added pgjdbc/pgjdbc#1693 that describes the issue I found with 42.2.10-SNAPSHOT. Hope that helps.
    Dave Cramer
    @davecramer
    thx, got it
    I don't pay much attention to this. about the only channel I look at is debezium
    Chris Cranford
    @Naros
    Ah; np.
    :)
    zodikadem
    @zodikadem
    Hi I've been looking on internet to find the latest postgres sql data type to java data type mapping. can you please point me in the right direction ?
    Luis Martinez
    @luis3m
    Hello, I'm using PGCopyInputStream and I wonder how can I convert the array of bytes to int8range?
    Dave Cramer
    @davecramer
    sorry I don't check this often. Not sure what you are trying to do