Database Reference
In-Depth Information
and is also exactly the same as
SELECT * FROM MyCust;
though is not the same thing as
SELECT * FROM "MyCust";
There's more...
If you are extracting values from a table that is being used to create object names, then you
may need to use a handy function named quote_ident() . This function puts double quotes
around a value if PostgreSQL would require that for an object name, such as
postgres=# select quote_ident('MyCust');
quote_ident
-------------
"MyCust"
(1 row)
postgres=# select quote_ident('mycust');
quote_ident
-------------
mycust
(1 row)
quote_ident() may be especially useful if you are creating a table based on a variable
name in a PL/pgSQL function, such as.
EXECUTE 'CREATE TEMP TABLE ' || quote_ident(tablename) ||
'(col1
INTEGER);'
Enforcing same name, same column
deinition
Sensibly designed databases have smooth, easy to understand definitions. This allows all
users to understand the meaning of data in each table. It is an important way of removing
data quality issues.
Getting ready
If you want to run the queries in this recipe as a test, then use the following examples.
Alternatively, you can just check for problems in your own database:
 
Search WWH ::




Custom Search