postgres_scanner icon indicating copy to clipboard operation
postgres_scanner copied to clipboard

LIMIT 1 returns two rows

Open rainhead opened this issue 3 months ago • 0 comments

attach 'postgresql://postgres:[email protected]:54322/postgres' as pg (type postgres);
select * from pg.obs limit 1;
┌───────────┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────┐
│    id     │      fetched_at      │                                          data                                          │
│   int64   │ timestamp with tim…  │                                        varchar                                         │
├───────────┼──────────────────────┼────────────────────────────────────────────────────────────────────────────────────────┤
│ 221687032 │ 2025-11-01 12:32:5…  │ {"id": 221687032, "uri": "https://www.inaturalist.org/observations/221687032", "user…  │
│ 221649507 │ 2025-11-01 12:32:5…  │ {"id": 221649507, "uri": "https://www.inaturalist.org/observations/221649507", "user…  │
└───────────┴──────────────────────┴────────────────────────────────────────────────────────────────────────────────────────┘

$ duckdb --version
v1.4.1 (Andium) b390a7c376

127.0.0.1 postgres@postgres=> \d obs
                           Table "public.obs"
   Column   |           Type           | Collation | Nullable | Default
------------+--------------------------+-----------+----------+---------
 id         | bigint                   |           | not null |
 fetched_at | timestamp with time zone |           |          |
 data       | jsonb                    |           |          |
Indexes:
    "obs_pkey" PRIMARY KEY, btree (id)

select version();
PostgreSQL 17.6 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit

The obs table has a few thousand rows.

rainhead avatar Nov 01 '25 19:11 rainhead