misc: Miscelaneous functions

Description Usage Arguments Details Author(s) Examples

Description

Various utility functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
libpq_version()

encrypt_password(passwd, user)

get_encoding()

set_encoding(encoding)

set_error_verbosity(verbosity)

toggle_echo()

enable_postgis(schemaname = "postgis")

enable_extension(extension, schemaname = extension)

Arguments

passwd

the password

user

the user name

encoding

the character encoding

verbosity

one of "terse", "default", "verbose"

schemaname

install in this schema

extension

the extension name

Details

enable_postgis will attempt to install the postgis extension in the named schema using enable_extension.

enable_extension will attempt to install the extension in the named schema. The default search path is altered to include the new schema.

Author(s)

Timothy H. Keitt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# try connecting to default database
createdb("rpgtesting")
connect("rpgtesting")
begin()

libpq_version()
encrypt_password("test", "tester")
get_encoding()
set_encoding("UTF8")
set_error_verbosity("terse")
set_error_verbosity("verbose")
set_error_verbosity("default")
enable_postgis()

# cleanup
rollback()
disconnect()
dropdb("rpgtesting")
## End(Not run)

rpg documentation built on May 2, 2019, 5:14 a.m.