Textual data types - Deepstash
Textual data types

Textual data types

Postgres offers 3 textual data types, each with its own purpose, but offering the same query performance:

  • char(n) → when you expect your data to always be N characters long (if it's shorter, Postgres adds spaces at the end)
  • varchar(n) → when you want to limit your data's length to N characters
  • text → when you want to store texts of any length

varchar and text can store strings that use up to 1GB, but if you want to change the limit of a varchar field, you have to rewrite the table. This process requires an exclusive lock on the table, meaning nobody can use it until the rewrite is complete.

9

48 reads

CURATED FROM

IDEAS CURATED BY

ocpodariu

Alt account of @ocp. I use it to stash ideas about software engineering

Similar ideas to Textual data types

Big data Hadoop

Big data Hadoop

  • Ability to store and process huge amounts of any kind of data, quickly. With data volumes and varieties constantly increasing, especially from social media and the Internet of Things (IoT) , th...

Python data processing with pandas

Pandas is a Python language package, which is used for data processing. This is a very common basic programming library when we use Python language for machine learning programming. This article is an introductory tutorial to it. Pandas provide fast, flexible and expressive data structures with t...

When you should use cash

  • When you have an emergency: Cash is accepted everywhere, so have some on hand. Dave Ramsey recommends having at least $1,000 in an emergency fund.
  • When you want to limit your spending: Psychologically, we spend less money when we use cash as you ca...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates