当我点击查询以插入行时,我正在为我的项目使用django模型
查询:

 INSERT INTO "intelligence_centre_organicsearchresults"
 ("keyword", "location", "position", "page_no", "headline", "url", "exerpt", "query_url", "content_updated_date", "created_on", "modified_on", "downloaded")
 VALUES
 (E'abilify', NULL, 8, 1, E'NAMI | Abilify (aripiprazole)', E'/url?q=http://www.nami.org/Template.cfm?Section=About_Medications&template=/ContentManagement/ContentDisplay.cfm&ContentID=8133&sa=U&ei=-v5VT7HkHMTsrAf5wqCLBw&ved=0CEEQFjAH&usg=AFQjCNG7-G-LSrWE65DeZuDmy2Uvi71HTg', E'What is the most important information I should know about Abilify®? Relapse is very common in schizophrenia and the most frequent cause is that patients stop ...www.nami.org/Template.cfm?Section=About_Medications... - Cached - Similar', NULL, NULL, E'2012-03-06 06:11:37.606388', E'2012-03-06 06:11:37.606449', true)

错误:
   ERROR:  value too long for type character varying(200)

我的架构字段大小也针对此问题进行了扩展:
  ALTER TABLE intelligence_centre_adwordsearchresults
ALTER COLUMN landing_page_url TYPE character varying(1000)

同样地,我也扩大了所有领域的规模。
我已附上我的表格说明作为屏幕截图。
请建议我解决这个错误?

最佳答案

先检查表名。如果你看到表名,你的解决方案是好的。

关于sql - 值太长,无法在Postgres中输入类型字元变化(200),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9583696/

10-11 14:28