Skip to content
Back to skills

RPostgres

ASecurity

R RPostgres package for PostgreSQL databases. Use for PostgreSQL connections with modern DBI interface.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
datasqldatabase

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill RPostgres --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of RPostgres?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for RPostgres
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-rpostgres/badge)](https://www.skillsdirectory.com/skills/leolin990405-rpostgres)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: RPostgres
description: R RPostgres package for PostgreSQL databases. Use for PostgreSQL connections with modern DBI interface.
---

# RPostgres Package

PostgreSQL database interface.

## Connect

```r
library(DBI)
library(RPostgres)

con <- dbConnect(
  Postgres(),
  dbname = "mydb",
  host = "localhost",
  port = 5432,
  user = "user",
  password = "password"
)

# With connection string
con <- dbConnect(
  Postgres(),
  "postgresql://user:password@localhost:5432/mydb"
)
```

## Basic Operations

```r
# Query
df <- dbGetQuery(con, "SELECT * FROM users LIMIT 100")

# Write table
dbWriteTable(con, "new_table", df)

# Append
dbWriteTable(con, "existing", df, append = TRUE)

# Overwrite
dbWriteTable(con, "existing", df, overwrite = TRUE)
```

## Parameterized Queries

```r
dbGetQuery(con,
  "SELECT * FROM users WHERE id = $1 AND status = $2",
  params = list(123, "active")
)
```

## COPY Protocol (Fast)

```r
# Fast bulk insert
dbWriteTable(con, "big_table", big_df, copy = TRUE)
```

## Schemas

```r
# Specify schema
dbWriteTable(con, Id(schema = "analytics", table = "events"), df)
dbReadTable(con, Id(schema = "analytics", table = "events"))
```

## Disconnect

```r
dbDisconnect(con)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…