Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about pq

Read more about pq

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - pq

jackc pgx scan array

I want to scan in an array of strings using the pgx library without using pq ideally. Is there a way of doing this: sourceKeys := make([]string, 0, 1) err := rows.Scan( pq.Array(&sourceKeys), ...
test-img

user17976520

postgresql

go

pq

pgx

Votes: 0

Answers: 0

How to use time.Time in a postgres query?

I am using pq library in golang for postgres queries. I want to pass timestamp in the query string. Ex. query = 'SELECT \* FROM table WHERE ts \<= NOW() - interval '5 seconds'' Instead of NOW() ......
test-img

nrao

postgresql

go

pq

Votes: 0

Answers: 0

How to do WHERE IN/ANY on multiple columns in Golang with pq library?

I have a list of item type and item numbers like follows: items := models.ItemKeys{ ItemKeys: []models.ItemKey{ { ItemType: "type1", Ite...
test-img

Yusril Maulidan Raji

sql

postgresql

go

pq

Votes: 0

Answers: 1

Latest Answer

You could do the following: inSQL, args := "", []interface{}{} for i, itemKey := range items.ItemKeys { n := i * 2 inSQL += fmt.Sprintf("($%d,$%d),", n+1, n+2) args = a...
test-img

mkopriva

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved