From 67b81e42504cbf04ea87589c34e79a50fa8fae62 Mon Sep 17 00:00:00 2001 From: Akram Yakubov Date: Fri, 20 Dec 2024 00:09:55 -0800 Subject: [PATCH] Update show commands type oid (#1357) --- .../streams/effective/show.tables.with.newline/client.rpt | 2 +- .../streams/effective/show.tables.with.newline/server.rpt | 2 +- .../risingwave/streams/effective/show.ztables/client.rpt | 4 ++-- .../risingwave/streams/effective/show.ztables/server.rpt | 4 ++-- .../risingwave/streams/effective/show.zviews/client.rpt | 4 ++-- .../risingwave/streams/effective/show.zviews/server.rpt | 4 ++-- .../streams/pgsql/show.tables.with.newline/client.rpt | 2 +- .../streams/pgsql/show.tables.with.newline/server.rpt | 2 +- .../binding/risingwave/streams/pgsql/show.ztables/client.rpt | 2 +- .../binding/risingwave/streams/pgsql/show.ztables/server.rpt | 2 +- .../binding/risingwave/streams/pgsql/show.zviews/client.rpt | 2 +- .../binding/risingwave/streams/pgsql/show.zviews/server.rpt | 2 +- .../risingwave/internal/stream/RisingwaveProxyFactory.java | 4 +++- 13 files changed, 19 insertions(+), 17 deletions(-) diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/client.rpt index 687e504752..d19c0a7b32 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/client.rpt @@ -58,7 +58,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/server.rpt index f5be0060df..8f38452afc 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.tables.with.newline/server.rpt @@ -56,7 +56,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/client.rpt index 183c87362f..9d1c65d806 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/client.rpt @@ -42,7 +42,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") @@ -51,7 +51,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("sql") .tableOid(0) .index(0) - .typeOid(20) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/server.rpt index c407fc66ee..2d4a096a97 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.ztables/server.rpt @@ -44,7 +44,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") @@ -53,7 +53,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("sql") .tableOid(0) .index(0) - .typeOid(20) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/client.rpt index a87203a830..6eddc691a8 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/client.rpt @@ -42,7 +42,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") @@ -51,7 +51,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("sql") .tableOid(0) .index(0) - .typeOid(20) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/server.rpt index 1d6af65ec3..9349a45b7e 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/effective/show.zviews/server.rpt @@ -44,7 +44,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") @@ -53,7 +53,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("sql") .tableOid(0) .index(0) - .typeOid(20) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/client.rpt index 270b9b4247..e4295d793d 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/client.rpt @@ -44,7 +44,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/server.rpt index 66dfd41845..d2aaeb0d4c 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.tables.with.newline/server.rpt @@ -46,7 +46,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(8) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/client.rpt index ee41dddaf1..d7aa0fd77d 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/client.rpt @@ -43,7 +43,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(4) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/server.rpt index 9ac7e754f2..cbed6e429e 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.ztables/server.rpt @@ -46,7 +46,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(4) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/client.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/client.rpt index 4f701af13b..2c0f03233d 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/client.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/client.rpt @@ -43,7 +43,7 @@ read advised zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(4) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/server.rpt b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/server.rpt index 5f42c02f56..130d587f70 100644 --- a/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/server.rpt +++ b/incubator/binding-risingwave.spec/src/main/scripts/io/aklivity/zilla/specs/binding/risingwave/streams/pgsql/show.zviews/server.rpt @@ -46,7 +46,7 @@ write advise zilla:flush ${pgsql:flushEx() .name("Name") .tableOid(0) .index(0) - .typeOid(701) + .typeOid(1043) .length(4) .modifier(-1) .format("TEXT") diff --git a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/stream/RisingwaveProxyFactory.java b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/stream/RisingwaveProxyFactory.java index bae6ceb81f..3883a4ce1b 100644 --- a/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/stream/RisingwaveProxyFactory.java +++ b/incubator/binding-risingwave/src/main/java/io/aklivity/zilla/runtime/binding/risingwave/internal/stream/RisingwaveProxyFactory.java @@ -97,6 +97,8 @@ public final class RisingwaveProxyFactory implements RisingwaveStreamFactory private static final String SEVERITY_WARNING = "WARNING\u0000"; private static final String CODE_XX000 = "XX000\u0000"; + private static final int VARCHAR_TYPE_OID = 1043; + private static final String POSTGRES_USER = "postgres\u0000"; private static final String DEFAULT_USER = "default\u0000"; @@ -828,7 +830,7 @@ public void doDescription( .name("%s\u0000".formatted(name)) .tableOid(0) .index((short) 0) - .typeOid(701) + .typeOid(VARCHAR_TYPE_OID) .length((short) name.length()) .modifier(-1) .format(f -> f.set(PgsqlFormat.TEXT))