I've got a problem with Criteria from Doctrine2. Iusing Criteria to check a SMALLINT type in PostreSQL like this : $criteria = Criteria::create()->where(Crit
Using Postgres, I'm trying to use AUTO_INCREMENT to number my primary key automatically in SQL. However, it gives me an error. CREATE TABLE Staff ( ID
I have a simple query in PostgreSQL which is ok when I run it without any query parameters : select date_trunc('week', action_time),count(*) from event
Rails 3.2 app running on Heroku with Postgres. I added an index add_index :lines, :event_id Events have_many Lines. There are about about 2 million Lines and
While trying to execute this command: (venv) sreekarsiddula@Sreekars-MacBook-Air bidgala % /Users/sreekarsiddula/piapps/venv/bin/python3 manage.py createsuperus
I want a random selection of rows in PostgreSQL, I tried this: select * from table where random() < 0.01; But some other recommend this: select * from table
Currently I need to move my database from postgreSql to google cloud sql. I use pg_cron to remove stale records like this: SELECT cron.schedule('30 3 * * 6',
How do I write an SQL script to create a ROLE in PostgreSQL 9.1, but without raising an error if it already exists? The current script simply has: CREATE ROLE
I want to know if it is possible to store multiple values in a field in PostgreSQL. I have a table called Token with the columns id, text and category. categor
I want to fetch the last n rows from a table in a Postgres database. I don't want to use an ORDER BY clause as I want to have a generic query. Anyone has any su
I have a table in PostgreSQL with many columns, and I want to add an auto increment primary key. I tried to create a column called id of type BIGSERIAL but pgad
How to make a query to the Postgres data dictionary to find out all the privileges that a particular user has. I've been looking for a solution and I can not f
There is DataFrame.to_sql method, but it works only for mysql, sqlite and oracle databases. I cant pass to this method postgres connection or sqlalchemy engine.
Working with Wildfly 10 on the following: a JSON webservice accessing a postgresql db using hibernate through a DAO object. More specifically, my POJO User.jav
In MySQL, you can terminate a select query with \G (as opposed to \g) to display the results vertically: select * from foo \G *************** id: 1 bar: Hell
I have an error when running the the queries below on PostgreSQL from a Java code ..... sql = "CREATE TABLE IF NOT EXISTS table1 (s VARCHAR(100), p VARCHAR(
all. Include details about your goal: I'm trying to mock repository in e2e test Describe expected and actual results: Request to server will not have access
I'm not sure if its standard SQL: INSERT INTO tblA (SELECT id, time FROM tblB WHERE time > 1000) What I'm looking for is: what if tblA and
I'm installing plv8 in docker: FROM postgres:13 AS build ENV PLV8_VERSION=v3.0.0 RUN apt-get update && apt-get upgrade \ && apt-get instal
I am trying to make my web application work on offline mode by using pouchDB. but the backend database server i used is PostgreSQL (NoSQL). I couldn't find a wa