inside a single quoted string.
set add table (set id = 1, origin = 1, id = 6, fully qualified name ='"Schema.name".user', comment = 'Table with evil name - user, and a field called user');
set add table (set id = 1, origin = 1, id = 7, fully qualified name ='"Schema.name"."Capital Idea"', comment = 'Table with spaces in its name, caps, and a user field as PK');
+
+set add table (set id = 1, origin = 1, id = 8, fully qualified name ='public."Jan''s bad ideas"', comment = 'Table single quote in name');
"eViL StudlyCaps column" text
);
create unique index "user" on public.evil_index_table(id);
+
+create table public."Jan's bad ideas" (
+ id int4 primary key
+);
,"SELECT id, \"user\" from \"Schema.name\".\"user\" order by id"
,"SELECT \"user\", description from \"Schema.name\".\"Capital Idea\" order by \"user\""
,"SELECT id, name, \"eViL StudlyCaps column\" from public.evil_index_table order by id"
+ ,"SELECT id from \"Jan's bad ideas\" order by id"
];
instring_buffer[instring_length]=*yytext;
BEGIN(IN_STRING);
}
-<IN_STRING>''
+<IN_STRING>'' {
+ if ( instring_buf_length < instring_length + yyleng+1 )
+ {
+ instring_buffer=realloc(instring_buffer,instring_buf_length*2);
+ instring_buf_length=instring_buf_length*2;
+ }
+ instring_buffer[instring_length++] = '\'';
+
+
+ }
<IN_STRING>[^']+ {
if ( instring_buf_length < instring_length + yyleng+1 )
{