Questions tagged [quoted-identifier]

The requirement for or use of double quotation marks around identifiers.

18 questions
30
votes
1 answer

Postgres : Relation does not exist error

I used pg_restore to load my postgres db with a dump file. I connected to my db with my user : sudo -u arajguru psql dump select current_user; current_user -------------- arajguru Now I was able to see all the newly created tables: dump=> \dt …
Ayushi Rajguru
  • 403
  • 1
  • 4
  • 4
9
votes
2 answers

Can column name be "Group" in PostgreSQL or in any databases

I was designing a project which specifies that in a table what column name should be and one of the column name in the specification is "group". I tried creating it but it always throw a syntax error near the word = "group". I am really curious…
AKIWEB
  • 625
  • 2
  • 6
  • 8
6
votes
3 answers

Why are unquoted identifiers upper-cased per SQL-92?

Section 5.6 of the SQL-92 standard contains rules 10...13 per which unquoted identifiers should be upper-cased, so foo becomes FOO but "foo" remains foo. These rules are respected by Oracle, IBM DB2, Snowflake, and ksqlDB but not by Postgres, MySQL…
4
votes
2 answers

UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER' in Agent job

In brief, I added a computed column to a table and then Agent jobs began failing and reporting the error: UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with…
2
votes
0 answers

Catching QUOTED_IDENTIFIER Errors in Trigger without aborting transaction

Is there a way to catch a QUOTED_IDENTIFIER error without failing the transaction? I have assembled a minimal test case here. The trigger must have SET QUOTED_IDENTIFIER ON because it uses XML data processing to concatenate the message it…
Cade Roux
  • 6,684
  • 1
  • 33
  • 55
1
vote
1 answer

What function do I need to get single quoted constants in the generated SQL? The code generator wraps the single-quoted output in double quotes

I wanted to create a view that sums a table common to a number of schemas, as expressed here, and includes the schema name or a derived expression as a column, so I created a view that includes the schema name as a constant value, by using the…
vfclists
  • 1,093
  • 4
  • 14
  • 21
1
vote
1 answer

SQL Job fails due to QUOTED_IDENTIFIER = OFF

I have a SQL agent job that runs nightly at 2am successfully for the last year; We haven't made any change to that job specifically but it suddenly gives error: MERGE failed because the following SET options have incorrect settings:…
Fylix
  • 232
  • 3
  • 12
0
votes
2 answers

PSQL: passing variables into a select 'create user ... ' subquery

In Postgres I'm trying to automatize the creation of a non-existing db-user (using it in Debian's postinst script) in the following way: SELECT 'CREATE USER :v1' WHERE NOT EXISTS (SELECT FROM pg_user WHERE usename = ':v1')\gexec and calling via …
Paule
  • 3
  • 2
0
votes
1 answer

Postgresql granting a username to specific database

I'm trying to create a user that only has access to one database. It's telling me database doesn't exist but clearly it does by following. postgres=# \l List of databases Name | Owner | Encoding…
Randy R
  • 103
  • 2
0
votes
0 answers

column "tum_first_name" of relation "tbl_users" does not exist, even when it does

I have a tbl_users, where there are a few columns like TUM_First_Name,TUM_Last_Name and so on. However, when I try an insert query, an error says :- column "tum_first_name" of relation "tbl_users" does not exist Here is a photo of the schema…
Skumar
  • 213
  • 2
  • 4
  • 8
0
votes
1 answer

Error with non-standard identifier in \copy command

Would like to be able to add characters like '-' in the schema name when running COPY command in PostgreSQL. Any way to get around this? psql -d postgres -c "\COPY (SELECT * FROM test-schema.tableName) TO data.csv DELIMITER ',' CSV" ERROR: syntax…
amateur
  • 103
  • 2
0
votes
1 answer

Cannot drop database in postgres

I would like to unserstand why I am not able to drop a database from cmd: I execute the command: drop database if exists but the result is as below: postgres=# drop database testV5; ERROR: database "testV5" does not exist knowing that…
rainman
  • 205
  • 1
  • 4
  • 13
0
votes
2 answers

Error querying postgresql table created in pgAdmin

I have successfully created a table in pgAdmin which generated the code: CREATE TABLE public."Test3" ( "PID" integer, "Name" character varying(20), PRIMARY KEY ("PID") ) TABLESPACE pg_default; ALTER TABLE public."Test3" OWNER to…
haresfur
  • 115
  • 5
0
votes
1 answer

quoted identifiers on filtered indices

I´ve 2 questions. I am using a T-SQL Server 2014. When creating a table with a filtered index on a T-SQL server, it is a must-have to set QUOTED_IDENTIFIER to ON. Why is this so? I´ve some SPs which have set quoted_identifiers to OFF, my question…
0
votes
0 answers

Why can't I access some tables in postgresql

I am running into some strange problem in PostgreSQL $ sudo -u postgres psql Blogging psql (10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)) Type "help" for help. Blogging=# \dt List of relations Schema | Name | Type | Owner…
Tim
  • 149
  • 1
  • 8
1
2