Skip to content

Commit 1e46833

Browse files
committed
removes ltree from bin test, note on type-mapping
1 parent 3391f71 commit 1e46833

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

connectorx-python/connectorx/tests/test_postgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def test_postgres_with_index_col(postgres_url: str) -> None:
450450

451451

452452
def test_postgres_types_binary(postgres_url: str) -> None:
453-
query = "SELECT test_date, test_timestamp, test_timestamptz, test_int16, test_int64, test_float32, test_numeric, test_bpchar, test_char, test_varchar, test_uuid, test_time, test_json, test_jsonb, test_bytea, test_enum, test_f4array, test_f8array, test_narray, test_i2array, test_i4array, test_i8array, test_citext, test_ltree FROM test_types"
453+
query = "SELECT test_date, test_timestamp, test_timestamptz, test_int16, test_int64, test_float32, test_numeric, test_bpchar, test_char, test_varchar, test_uuid, test_time, test_json, test_jsonb, test_bytea, test_enum, test_f4array, test_f8array, test_narray, test_i2array, test_i4array, test_i8array, test_citext FROM test_types"
454454
df = read_sql(postgres_url, query)
455455
expected = pd.DataFrame(
456456
index=range(4),
@@ -549,7 +549,7 @@ def test_postgres_types_binary(postgres_url: str) -> None:
549549
dtype="object",
550550
),
551551
"test_citext": pd.Series(["str_citext", "", "s", None], dtype="object"),
552-
"test_ltree": pd.Series(["A.B.C.D", "A.B.E", "A", None], dtype="object"),
552+
# "test_ltree": pd.Series(["A.B.C.D", "A.B.E", "A", None], dtype="object"), # waiting for https://github.com/sfackler/rust-postgres/issues/960
553553
},
554554
)
555555
assert_frame_equal(df, expected, check_names=True)

docs/databases/postgres.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ cx.read_sql(conn, query) # read data from
4141
| JSON | object | |
4242
| JSONB | object | |
4343
| ENUM | object | need to convert enum column to text manually (`::text`) when using `csv` and `cursor` protocol |
44+
| ltree | object | binary protocol returns with a hex char prefix. Check https://github.com/sfu-db/connector-x/pull/382 and https://github.com/sfackler/rust-postgres/issues/960 for status |
4445
| INT2[] | object | list of i64 |
4546
| INT4[] | object | list of i64 |
4647
| INT8[] | object | list of i64 |

0 commit comments

Comments
 (0)