Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: raf <raf(at)raf(dot)org>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Date: 2020-04-29 04:19:05
Message-ID: D9F0D7D1-9D46-4B9B-8B62-EE139159F62E@crazybean.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

> On Apr 28, 2020, at 10:29 PM, raf <raf(at)raf(dot)org> wrote:
>
> Rui DeSousa wrote:
>
>>> On Apr 28, 2020, at 7:43 PM, raf <raf(at)raf(dot)org> wrote:
>>>
>>> I just use "text" for everything. It's less typing. :-)
>>
>> Ugh, I see it as sign that the designers of the schema didn’t fully
>> think about the actual requirements or care about them and it usually
>> shows.
>
> You are mistaken. I care a lot. That's why I
> future-proof designs whenever possible by
> not imposing arbitrarily chosen limits that
> appear to suit current requirements.
>
> In other words, I know I'm not smart enough
> to predict the future so I don't let that
> fact ruin my software. :-)
>
> cheers,
> raf
>

Arbitrarily? What’s a cusip, vin, ssn? Why would you put a btree index on a text field? Because it’s not.

What you’re advocating is a NoSQL design — defer your schema design. Letting the application code littered in multiple places elsewhere define what a cusip, etc. is.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-04-29 04:34:10 Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Previous Message raf 2020-04-29 02:29:28 Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2020-04-29 04:34:10 Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Previous Message 曾文旌 2020-04-29 03:22:42 Re: [Proposal] Global temporary tables