Rich Text in Postgres DB

What is the recommended way for me to save multiple paragraph product descriptions for my online store? I'd like to include <Link> tags to other pages of my app, as well as use <em> and <strong> tags for formatting.
3 Replies
Neto
Neto2mo ago
postgres should be able to handle that easily https://blog.rustprooflabs.com/2020/07/postgres-storing-large-text but if you don't want to do that, you can always store the text as a blob (s3) and parse it later when needed on a side note postgres should be able to handle that prisma is more up to grab be extra careful when dealing with large columns https://dev.to/stneto1/cost-of-serialization-408i
Ya
YaOP2mo ago
Thanks. Is it a common pattern to save multiple paragraphs in a DB and use Prisma or Drizzle & map over the line breaks, placing them into <p> tags? Or should I use something like ContentLayer and just use Markdown
Neto
Neto2mo ago
markdown is probably the best for it still mdx or something like that and dump the raw body into it
Want results from more Discord servers?
Add your server