Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>By specifying the column as <code>VARCHAR(500)</code> you've set an explicit 500 character limit. You might not have done this yourself explicitly, but Django has done it for you somewhere. Telling you where is hard when you haven't shown your model, the full error text, or the query that produced the error.</p> <p>If you don't want one, use an unqualified <code>VARCHAR</code>, or use the <code>TEXT</code> type.</p> <p><code>varchar</code> and <code>text</code> are limited in length only by the system limits on column size - about 1GB - and by your memory. However, adding a length-qualifier to <code>varchar</code> sets a smaller limit manually. All of the following are largely equivalent:</p> <pre><code>column_name VARCHAR(500) column_name VARCHAR CHECK (length(column_name) &lt;= 500) column_name TEXT CHECK (length(column_name) &lt;= 500) </code></pre> <p>The only differences are in how database metadata is reported and which SQLSTATE is raised when the constraint is violated.</p> <p>The length constraint is not generally obeyed in prepared statement parameters, function calls, etc, as shown:</p> <pre><code>regress=&gt; \x Expanded display is on. regress=&gt; PREPARE t2(varchar(500)) AS SELECT $1; PREPARE regress=&gt; EXECUTE t2( repeat('x',601) ); -[ RECORD 1 ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ?column? | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </code></pre> <p>and in explicit casts it result in truncation:</p> <pre><code>regress=&gt; SELECT repeat('x',501)::varchar(1); -[ RECORD 1 ] repeat | x </code></pre> <p>so I think you <em>are</em> using a <code>VARCHAR(500)</code> column, and you're looking at the wrong table or wrong instance of the database.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload