singhpk234 commented on code in PR #1371:
URL: https://github.com/apache/polaris/pull/1371#discussion_r2059427494


##########
extension/persistence/relational-jdbc/src/main/resources/postgres/schema-v1.sql:
##########
@@ -15,16 +15,12 @@
 -- KIND, either express or implied.  See the License for the
 -- specific language governing permissions and limitations
 -- under the License.
---
 
--- Note: Database and schema creation is not included in this script. Please 
create the database and
--- schema before running this script. for example in psql:
--- CREATE DATABASE polaris_db;
--- \c polaris_db
--- CREATE SCHEMA polaris_schema;
--- set search_path to polaris_schema;
+CREATE SCHEMA IF NOT EXISTS POLARIS_SCHEMA;
+SET search_path TO POLARIS_SCHEMA;
 
 CREATE TABLE IF NOT EXISTS entities (
+    realm_id TEXT NOT NULL,

Review Comment:
   did some deep-dive per PGSQL : 
https://wiki.postgresql.org/wiki/Don't_Do_This#Text_storage  shouldn't and this 
is prefered over char(n), varchar(n) 
   
   though @flyrain mentioned it not to be enforced at schema level but at 
application level. Which is what we can do incase the concern is mis-use.
   
   for the case-sensitivity are suggesting marking column something as 
   
   ```
   CREATE TABLE my_table (
       id SERIAL PRIMARY KEY,
       sensitive_data TEXT COLLATE "C"
   );
   ```
   can this be configured as default at database level ? seems like the default 
of Postgres is case insensitive.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to