Search Postgresql Archives

Re: Question on Table creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sud <suds1434@xxxxxxxxx> writes:
> We are newly creating tables in postgres 15.4 version and we got the DDL
> auto generated from one of the tools and they look something like below.
> (note- I have modified the exact names to some dummy names.) These are all
> failing because the schema which already exists in the database having name
> 'schema_name' which is all lower case.So then i modified the script to
> remove the double quotes from all the table/column/schema names, as it
> seems postgres makes things case sensitive if they are put in quotes.

> But then encountered the opposite, i.e. some places where it's showing the
> object already created in the database as Upper case or mixed case like
> schema owner which is showing as "*S*chema_*O*wner" as I see in the
> information_schema.schemata data dictionary. And here the scripts failing
> if removing the quotes from the schema owner.

I'd advise reading this section carefully:

https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Notably, the advice to "always quote a particular name or never quote
it" could be a useful rule for you here.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux