So...
`SELECT x FROM y WHERE x LIKE CONCAT('v', '%')` does not work
But
`SELECT x FROM y WHERE x LIKE 'v%'` does, as does
`SELECT x FROM y WHERE x LIKE 'v' || '%'`
Please. #Postgres and #PostgreSQL community, make it make sense???
So...
`SELECT x FROM y WHERE x LIKE CONCAT('v', '%')` does not work
But
`SELECT x FROM y WHERE x LIKE 'v%'` does, as does
`SELECT x FROM y WHERE x LIKE 'v' || '%'`
Please. #Postgres and #PostgreSQL community, make it make sense???
@sycobuny Weird, I get results from this.
```
# select id from users where email like concat('b', '%');
id
--------------------------------------
a205043d-acab-48cf-9916-9ef8e1b432cd
(1 row)
```
What is the column type of `x`? I'm using an older version of Postgres on this machine (at work we're still on 14), but Postgres is typically backwards-compatible.
@jamie `VARCHAR(8)` (legacy system ported over from MySQL). I feel like I've seen it work before and used it myself, which is why I'm baffled.
I use PG16 in this case, but I feel the same, these aren't wacky new experimental features, they're string concatenation.
But anyhow, if it were a type/operator mismatch problem, and I'm not saying it's not, it's what I keep thinking but I can't see how, I'd expect an error, not a silent failure to return any reasonable data.