3 ms·
> The only functions here all take a filesystem path From the documentation: > Creating a pdf type, by casting either text path or bytea blob. With the examp
by claudex 2y ago
> The only functions here all take a filesystem path
From the documentation:
> Creating a pdf type, by casting either text path or bytea blob.
With the example: SELECT ''::bytea::pdf;
So it's convenient to use the path to test quickly, but you can use anything in PostgreSQL which return (or can be convert) a bytea
- andy_ppp 2y agoSo potentially there’s a full text search case (?) for doing this but I’d always just default to adding documents like this to elastic search instead. I just cannot see a good use case for this and lots of bad ones.
- vundercind 2y agoIt's probably mainly aimed at data pipeline use cases. It's common to have stages of very "messy" data that you'll want to clean up. This lets you keep that part of it all in Postgres, if you like, if your messy data is PDFs, which is a fairly common case. Not every object in a database needs to be ready for public consumption. Some of it's there for processing, for certain use cases.
- fforflo 2y agoThe first iteration of this was actually FTS only https://tselai.com/full-text-search-pdf-postgres https://tselai.com/full-text-search-pdf-postgres In the second pass I made `pdf` a type.