#3214: raw sql file doesn't recognize quotes correctly
------------------------------------------+---------------------------------
Reporter:  shaunc <[EMAIL PROTECTED]>  |       Owner:  adrian
Type: defect | Status: new Priority: normal | Milestone: Component: Database wrapper | Version: Severity: normal | Keywords: ------------------------------------------+---------------------------------
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
}}}

--
Ticket URL: <http://code.djangoproject.com/ticket/3214>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to