Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql use alternative character instead of quote for column and table names

Tags:

c#

postgresql

Is it possible to use different character instead of " for PostgreSQL table and column names?

Something like:

select [TableID], [TableColumn] from [TableName]

or

select 'TableID', 'TableColumn' from 'TableName'

instead of:

select "TableID", "TableColumn" from "TableName"

I use C# and each time I need to replace " with "" when I paste SQL into a C# string and than back "" to " when I copy C# string to SQL manager.

I wonder is there is anything to use instead of " to quote the names in PostgreSQL.

CamelCase in PostgreSQL require names to be quoted, in other case the names will be automatically lower cased - what I try to avoid.

And yes, I need a camel case table and column names in PostgreSQL to auto map them to C# property names.

like image 438
Zelid Avatar asked Dec 31 '25 09:12

Zelid


1 Answers

No, this is not possible.

The only allowed quote character for object names is the double quote (as required by the SQL standard).