Return the transaction id types as int in pg and pgdb

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

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
40/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, postgresql, python
領域
database

調査の方向性

Start from the table in the issue, which shows xid, cid and xid8 returned as str by pgdb and as str for xid8 by pg. Read how set_typecast is applied to these types in both modules, and check the existing tests for xid and cid values. Done means xid, xid8 and cid come back as int in pg and pgdb, including inside arrays and records, with the test suite passing. Confirm the planned 7.0 change with the maintainer before starting.

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

説明

enhancement

The transaction id types are returned inconsistently:

type pg pgdb
xid int str
cid int str
xid8 (PostgreSQL 13) str str

xid8 is returned by pg_current_xact_id() and the other functions that replace the txid_* functions (which return bigint, i.e. int). oid and, since 6.3, oid8 are int in both modules.

Changing the defaults would break code that works with the returned strings, so I plan to do it in 7.0: return xid, xid8 and cid as int in pg and pgdb, also as elements of arrays and records. Until then, the typecasts can be set explicitly:

pg.set_typecast('xid8', int)
pgdb.set_typecast(['xid', 'xid8', 'cid'], int)
主要言語
Python
スター
48
フォーク
22
平均マージ
12分
マージ済み PR(30日)
28

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

PyGreSQL/PyGreSQL のほかの issue

PyGreSQL/PyGreSQL の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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