【发布时间】:2012-03-23 22:20:57
【问题描述】:
我正在为我的项目使用 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)
同样,我扩展了所有字段的大小。
我已附上我的表格描述作为屏幕截图。
请建议我解决这个错误?
【问题讨论】:
-
下次请将表定义发布为
CREATE TABLE语句。或者至少作为格式化文本,而不是作为屏幕截图
标签: sql postgresql django-models