News for hackers. Stuff that matters.
Re:Falsehoods Programmers Believe About Names – With Examples by throwaway2048 on Friday November 30, 2018 @10:57AM (#18569965)
Longer than 200 characters?
Re:Falsehoods Programmers Believe About Names – With Examples by masklinn on Friday November 30, 2018 @02:13PM (#18571732)
Makes no difference to postgres. The one and only difference is that you can limit the length of a varchar when you define the column but that aside the storage mechanism is the one I quoted above for both, and for char as well:

> There is no performance difference among these three types (nb: varchar, char and text), apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

And for applications which introspect the schema and display different field types depending on the column type, well you may not want a textarea for a name field.

Re:Falsehoods Programmers Believe About Names – With Examples by pandler on Friday November 30, 2018 @05:28PM (#18573324)
Where’s a reasonable cut off point? Surely you don’t want someone uploading a copy of War and Peace as their name.