Fork me on GitHub
#practicalli
<
2021-05-03
>
Oliver13:05:31

@jr0cket In your banking app you have table names like PUBLIC.ACCOUNTS. What is the meaning of PUBLIC in these names?

practicalli-johnny15:05:42

@oliver.heck Public is simply the default schema name in Postgres. If a schema is not specified when creating a table, it is placed under public https://www.postgresql.org/docs/9.1/ddl-schemas.html

Oliver15:05:47

Ok, so will I need to mimic that if I want to change from H2 to Postgres later?

practicalli-johnny16:05:36

I believe you can just specify a schema when using the sql create table function, so that hsql and Postgres are the same. Although I think hsqldb might also use public as the default schema. So if you only specify the table name, it will look in public by default. It's better to be explicit though. I'll need to check the code as to what I did exactly.

👍 2
GitHub (Legacy)16:05:58

GitHub app is successfully upgraded in your workspace 🎉 To receive notifications in your private channels, you need to invite the GitHub app /invite @GitHub