pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #924: How to query column's defined dimensions
5+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #924: How to query column's defined dimensions
@ 2025-11-12 09:17 "quaff (@quaff)" <noreply+quaff@github.com>
  0 siblings, 0 replies; 5+ messages in thread

From: quaff (@quaff) @ 2025-11-12 09:17 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Given `CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3))`,  `data_type` from `information_schema.columns` is `USER-DEFINED` instead of desired `vector(3)`, I'd like to know the defined dimensions to validate schema.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #924: How to query column's defined dimensions
@ 2025-11-12 09:27 ` "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2025-11-12 09:27 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @quaff, it'll be the same as querying the typmod for other types in Postgres.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #924: How to query column's defined dimensions
@ 2025-11-12 09:27 ` "ankane (@ankane)" <noreply+ankane@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: ankane (@ankane) @ 2025-11-12 09:27 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #924: How to query column's defined dimensions
@ 2025-11-13 06:51 ` "quaff (@quaff)" <noreply+quaff@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: quaff (@quaff) @ 2025-11-13 06:51 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Sorry, could you give an example SQL? thanks in advance.

^ permalink  raw  [nested|flat] 5+ messages in thread

* Re: [pgvector/pgvector] issue #924: How to query column's defined dimensions
@ 2025-11-13 07:54 ` "quaff (@quaff)" <noreply+quaff@github.com>
  3 siblings, 0 replies; 5+ messages in thread

From: quaff (@quaff) @ 2025-11-13 07:54 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Answered by Gemini:
```sql
SELECT
    a.attname AS column_name,
    a.atttypmod
FROM
    pg_attribute a
JOIN
    pg_class c ON a.attrelid = c.oid
JOIN
    pg_namespace n ON c.relnamespace = n.oid
WHERE
    n.nspname = 'your_schema_name'  -- e.g., 'public'
    AND c.relname = 'your_table_name'
    AND a.attnum > 0  -- Exclude system columns
    AND NOT a.attisdropped; -- Exclude dropped columns
```

^ permalink  raw  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2025-11-13 07:54 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-12 09:17 [pgvector/pgvector] issue #924: How to query column's defined dimensions "quaff (@quaff)" <noreply+quaff@github.com>
2025-11-12 09:27 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-11-12 09:27 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-11-13 06:51 ` "quaff (@quaff)" <noreply+quaff@github.com>
2025-11-13 07:54 ` "quaff (@quaff)" <noreply+quaff@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox