Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure schema for R2DBC PostgreSQL

I try to use Spring Data R2DBC with postgres.

I know some configuration for url, username, password.

spring.r2dbc.url
spring.r2dbc.username
spring.r2dbc.password

Is there something for the schema? Any list of setting available?

like image 370
robert trudel Avatar asked Jun 26 '19 11:06

robert trudel


People also ask

How do I create a PostgreSQL schema?

PostgreSQL has a CREATE SCHEMA statement that is used to create a new schema in a database. Syntax: CREATE SCHEMA [IF NOT EXISTS] schema_name; Let's analyze the above syntax: First, specify the name of the schema after the CREATE SCHEMA keywords.

How do I create a default schema in PostgreSQL?

The output will be, After creating a new schema, you can make it a default schema instead of a public schema. To make a schema default, the search_path variable is used. Search_path variable defines the schema order in which they are searched when an object is referenced without any schema name.


1 Answers

Schema is Postgres-specific and can be configured through the R2DBC Connection URL:

r2dbc:postgresql://<server>:<port>/<database>?schema=<yourSchema>

See also:

  • Documentation
like image 137
mp911de Avatar answered Sep 28 '22 17:09

mp911de