Nonempty icollection values cannot be read back from text or restored from a dump

オープン
#48 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@Vonng がすでに取り組んでいます。

2026年11月27日 から。

  • #49 @Vonng による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
c, postgresql
領域
databases

調査の方向性

Start with the integer-key output and input functions described in the issue, then inspect test/sql/subscript.sql around test 18. Reproduce the text round-trip failure and check the existing test coverage. Done means a nonempty icollection value can be read back from its text output and restored from a dump; linked pull request #49 indicates work is already underway.

索引モデルが issue の本文から書いたものです。

説明

Hi! I found a text round-trip failure for nonempty integer-key collections in pgcollection 2.1.3. It also prevents restoring a table containing one of these values.

CREATE EXTENSION collection;
CREATE TABLE sample (c icollection);
INSERT INTO sample VALUES ('{"value_type":"bigint","entries":{"2":"2"}}');
SELECT c::text FROM sample;              -- {2: 2}
SELECT c::text::icollection FROM sample;  -- ERROR: Invalid format

On PostgreSQL 19.0, dumping this database with pg_dump -Fc succeeds, but pg_restore --exit-on-error fails during COPY sample on the same value. I expected to read back key 2 with its original bigint value.

The integer-key output function omits the value type and writes unquoted keys; the input function expects a JSON object with value_type and entries. Subscript test 18 already exercises this case. Issue #7 concerned the string-key collection.

主要言語
C
スター
24
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/pgcollection のほかの issue

aws/pgcollection の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。