On Fri, Jun 28, 2013 at 2:11 AM, Burak Arslan
<[email protected]> wrote:
> On 06/27/13 13:41, Simon King wrote:
>> Remember that Python also has its own string escaping. When you write
>> a literal '\\' in Python, you are creating a string containing a
>> single backslash.
>
>
> Hi Simon,
>
> I'm aware of that. My issue is that SQLAlchemy produces an invalid query
> for .like('\\') in postgresql.
>
> Best,
> Burak
I don't think I understand. From your own example, "LIKE" with a
single backslash is invalid in PG:
somedb=# select * from a where a like '\';
ERROR: LIKE pattern must not end with escape character
When you write this:
>>> e.execute(t.select(t.c.a.like('\\')))
...the pattern that you are sending to SA is a single backslash, and
SA is forwarding that directly to PG. What do you think the behaviour
should be in this case?
Simon
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.