question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support expressions like "SUBSTRING(a FROM b)"

See original GitHub issue

Hey!

    update sp.users
      set team_id='TEAM_ID', role='member'
      from sp.teams
      where
        sp.teams.domain = substring(sp.users.email from '@(.*)$')
        and sp.teams.team_id = 'TEAM_ID';

This query works in pg but fails in pg-mem. Any quick suggestions for tests?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nikhilrocommented, Jul 12, 2021

Thanks for making this package 😃 Incredibly useful (when it works which is most of the time haha!)

0reactions
ericarosalinacommented, Jun 1, 2022

Thanks for the reply @oguimbal, but I didn’t use substring in my query and still got the error. I think it might be the UPDATE ... FROM ... because that’s what I have as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Like Operator - Microsoft Support
Use the Like operator to find values in a field that match the pattern you specify. ... Compares a string expression to a...
Read more >
Overview of the SQL LIKE Operator - SQLShack
This article explores the use of SQL LIKE operator using regular expressions to find and/or manipulate text.
Read more >
Documentation: 15: 9.7. Pattern Matching - PostgreSQL
The pattern matching operators of all three kinds do not support ... The LIKE expression returns true if the string matches the supplied...
Read more >
Regex Tutorial - \b Word Boundaries
The GNU extensions to POSIX regular expressions add support for the \b and \B word boundaries, as described above. GNU also uses its...
Read more >
Db2 11 - Db2 SQL - LIKE predicate - IBM
The description of each argument lists the supported expressions. match-expression: An expression that specifies the string to be tested for conformity to a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found