-
-
Notifications
You must be signed in to change notification settings - Fork 256
-
Hi all,
I don't know if I'm using it wrong, but I can't execute this query without the TRIM function. Is this normal?
SELECT TRIM(P.RDB$USER) FROM RDB$USER_PRIVILEGES AS P INNER JOIN SEC$USERS AS U ON TRIM(P.RDB$USER) = U.SEC$USER_NAME WHERE P.RDB$PRIVILEGE = 'M' AND P.RDB$USER_TYPE = 8 AND P.RDB$OBJECT_TYPE = 13 AND P.RDB$RELATION_NAME = ?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
Yes, this is normal, because the metadata tables use CHAR(63)
(or (CHAR(31)
in Firebird 3.0 and older) columns, which means they are padded with spaces up to the declared length.
Beta Was this translation helpful? Give feedback.
All reactions
-
That said, the comparison itself in the join condition shouldn't require a trim.
Beta Was this translation helpful? Give feedback.