Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions pages/common/ecpg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ecpg

> Embedded SQL preprocessor for C programs.
> More information: <https://www.postgresql.org/docs/current/app-ecpg.html>.

- Preprocess a specific file:

`ecpg {{input.pgc}}`

- Preprocess from `stdin` and output to `stdout`:

`ecpg -o - -`

- Preprocess from `stdin` and write to a file:

`cat input.pgc | ecpg -o output.c -`

- Preprocess and specify an output file:

`ecpg -o {{output.c}} {{input.pgc}}`

- Preprocess a header file (`.pgh` extension):

`ecpg {{input.pgh}}`

- Preprocess in a specific compatibility mode:

`ecpg -C {{INFORMIX|INFORMIX_SE|ORACLE}} {{input.pgc}}`

- Preprocess with autocommit enabled:

`ecpg -t {{input.pgc}}`
20 changes: 20 additions & 0 deletions pages/common/postgres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# postgres

> Run the PostgreSQL database server.
> More information: <https://www.postgresql.org/docs/current/app-postgres.html>.

- Start the server on a specific port (defaults to 5432):

`postgres -p {{5433}}`

- Set a runtime parameter (short form):

`postgres -c {{shared_buffers=128MB}}`

- Set a runtime parameter (long form):

`postgres --{{shared-buffers}}={{128MB}}`

- Start in single-user mode for a specific database (defaults to the user name):

`postgres --single -D {{path/to/datadir}} {{my_database}}`