﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3214	[patch] raw sql file doesn't recognize quotes correctly	shaunc <shaun@…>	nobody	"Suppose I have an app foo with a model Bar.
in foo/sql/bar.postgresql_psycopg2.sql I have:


{{{
CREATE OR REPLACE FUNCTION test() RETURNS trigger LANGUAGE plpythonu AS $$
  '''this will have problems if it contains an embedded ;
  '''
$$;

}}}
This generates the following error on syncdb:
{{{
sql /* cranedata.db.search.sql.searchmodel.postgresql_psycopg2
 *
 * Setup for 'SearchModel':
 *   want to have a trigger on SearchModels which sets up a trigger
 *   on models searched, such that when rows of these models are
 *   modified, text fields are automatically indexed.
 */

sql CREATE OR REPLACE FUNCTION test() RETURNS trigger LANGUAGE plpythonu AS $$
  '''this will have problems if it contains an embedded ;
params ()
Failed to install initial SQL data for search.SearchModel model: unterminated dollar-quoted string a
t or near ""$$
  '''this will have problems if it contains an embedded ;"" at character 355
}}}
"	Bug	closed	Database layer (models, ORM)	dev	Release blocker	fixed	rawsql migrations	shaun@… sam@… andrehcampos@… aseering@… walter+django@… vlastimil.zima@… Christophe Pettus sbarre vlastimil@… 4glitch@…	Ready for checkin	1	0	0	0	0	0
