Closed ghost closed 9 years ago
Interestingly that if the table name is not quoted at creation time it all works fine.
CREATE TABLE CHECK_ROW_LEVEL_LOCKS
(
id serial NOT NULL,
msg text,
CONSTRAINT "CHECK_ROW_LEVEL_LOCKS_pkey" PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE CHECK_ROW_LEVEL_LOCKS
OWNER TO postgres;
When you don't quote it it's the same as if you would use lower case. Unquoted object names are case insensitive. Citing the manual:
Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case.
I've checked the code and suprisingly it uses quote_literal
for some parts but not quote_ident
for table names.
Thanks for your comments and for the manual. A question on _quoteliteral and checking the code: which code did you check? I had a look at https://github.com/2ndQuadrant/audit-trigger/blob/master/audit.sql and there are no references of _quoteliteral.
Indeed. :) Wonder how I managed to miss it with CTRl+F.
If the table was created in lower case check_row_level_locks, then it would all be fine.