Postgresql Questions
Ad
How to get the number of deleted rows in PostgreSQL?
I am looking for a way to return the number of rows affected by a delete clause in postgresql. the
postgresql ignore milliseconds from timestamp when doing a select statement
I have tablea and it has a field of time_captured | timestamp without time zone | default now() it is being used to record when data was
Converting int64_t to string in C
I am working with c programming language and using postgres database to insert records. one of the columns of the table in the database is of type
What is the best SQL library for use in Common Lisp?
Ideally something that will work with oracle, ms sql server, mysql and posgress.
Returning API response correctly from Update method. Postgres db pg-promise Node.js
I'm just starting with building apis, node.js, postgres so this might be a bit of a naive question.. i have noticed that when i call the update
Escape password containing @ when using postgres pg_dump command
I 'm using postgres, i created db, user, password, this is the password: password = name&[email protected] i'm using the
How to declare local variables in postgresql?
There is an almost identical, but not really answered question
Failed to convert value of type 'java.lang.String' to required type 'java.sql.Date'
There is a spring mvc app where the customer has the option to place an order. you can set the date and time of the order in the
Effective strategy for leaving an audit trail/change history for DB applications?
What are some strategies that people have had success with for maintaining a change history for data in a fairly complex database. one of the
How to concatenate strings of a string field in a PostgreSQL 'group by' query?
I am looking for a way to concatenate the strings of a field within a group by query. so for example, i have a table: id
Ad
How can I get a list of all functions stored in the database of a particular schema in PostgreSQL?
I want to be able to connect to a postgresql database and find all of the functions for a particular schema. my thought was that i could
Use for the phppgadmin Reports Database?
Phppgadmin comes with instructions for creating a reports
Is it possible to stop an AWS Postgres Aurora Global Database?
I want to run aws postgres aurora global database in my staging environment, but i want to stop it overnight and weekends. it seems like this
How to start a named NodeJS container with a named image from a docker-compose file and and a Dockerfile specifying the image?
Given this directory structure: . ├── backend ├── compose.yaml └── frontend └── dockerfile.dev 2
Why does the DBMS say that the primary key is not present in the table
I am a cs student that is taking his first course in databases so here i am using postgresql to create a database with the following tables:
why this is a valid query in postgres? is it expensive for the dbms?
I am struggling to understand a part of a query, how could it be valid, and whether is an expensive bad practice or not. basically i have
Best way to measure query time in different DBMS (MySQL, SQlite, Postgres, MariaDB, Oracle)
For college i'm doing a thesis on performance in different dbms. i have set of tables with same set of data in 5 different dbms (mysql, mariadb,
Theoretical - Fastest way to compute different counts
I would like to know how experienced sql users would compute a lot of counts with different conditions. i have a table [population] and a table
Laravel/PDO JSONPATH request on Postgresql
I am trying to make a jsonpath request on a postgresql with laravel/pdo. here is what i need to archieve. select i.id as id,
Postgresql query where statement positions
I have two tables that i want to join. it works without where conditions. after adding where conditions, i got syntax error near a
Column doesn't exist error when trying to insert new value to table (on heroku using nodejs and pg library)
I'm playing with an app on heroku. it uses heroku postgresql but i have trouble inserting data to it. the code looks as follows:
Ad
Using Aggregation and Summarization in Postgresql
I have a simple query that is designed to summarize total_miles based on a group by aggregation of other columns:
JOINING tables with two conditions or two columns in common in PostgreSQL
Postgresql question: i have two tables. table 1 has item, color, and size for all items in the store. table 2 is a pricing list and has item,
sql query that depends on each value of other table
I'm not used to query sentences and this one is a bit tricky, i don't know even if it is possible (at least with just a single sql query) or if i
Division in group by SQL table
I have the following sql code select (count(*) filter (where has_a)) as count_a, count(*) as total_count, process_date from(select
Postgres syntax error in IF statement with NOT EXIST statement
I want to use if statement in insertion. insert into <table_name>(<columns>) values (if not exists
Unpivot in postgres with a column created in the same query
I am trying to unpivot a table with postgresql as described here. my problem is that i
How to save a list of numbers to Django model
I am pulling some data from an api and i want to store it in my django model. the data is a baseball inning and then runs scored that inning and
Concatenate string instead of just replacing it
I have a table with standard columns where i want to perform regular inserts. but one of the columns is of type
Select second most recent date from inner join
I have this query : select companies.display_name, companies.pay_schedule_id, pay_schedule_periods.schedule_id,
Incorrect auto-generated SQL query in Spring Boot (JPA) CrudRepository
My repository interfaces: songsrepository: public
Ad
how to delete the only the rows in postgres but not to drop table using pandas read_sql_query method?
I wanted to perform an operation where i would like to delete all the rows(but not to drop the table) in postgres and update with new rows in it.
Store enum in database
I have a database for a job advertisement web application for an assignment at university. i have a lot of enumeration values in database such as
How can I cause an UPDATE query to throw an error?
In my database i have the following table table "public.session" column | type | modifiers
search by full text does not return all results
I have the following table, with these columns first_name
Postgres database export and import, problem with $$PATH$$
I am in the process of doing export and import with postgres database. i had used the following command to take the backup of
SQL: get rows "under" chosen row
I have a table like that id name
SQL join by non null values
I have the following table: filters
How to prevent Write Ahead Logging on just one table in PostgreSQL?
I am considering log-shipping of write ahead logs
What happens to an open cursor after rolling back the transaction in Postgres using Psycopg2?
I am trying to copy a list of csv files into postgres using psycopg2's
How to export Postgres resultset as CSV from remote db connection to local machine?
I'm working on exporting resultset data from remote postgresql db to my local machine using psycopg2. i
Can I pass to npm which DB connection to use using environment variable?
I have a db connection in a js file
Ad
Passing parameter after query result (ExpressJS)
I am using expressjs & postgresql how to get parameter after query result in expressjs outside function this is my code
How do I set a foreign key for a Sequelize model?
This is very basic, and should work.. but doesn't. so first my models: const conversation = sequelize.define('conversation', {
How can I spin up multiple node js services inside of a single docker compose?
So what i want to do is to have 2 docker container running(mongodb and postgres) both of these are working. now what i want to do is to create 2
Select param when not null or another param
Select coalesce(a.task_id,b.task_id) as task_id,b.task_name as name from table_a as a full outer join table_b as b on a.task_id =
Postgres and Laravel search query
I have a query for multiple searches, the problem is with one of them, i get a correct result from it, but in combination with the rest, i get the
psycopg2.ProgrammingError: column cons.consrc does not exist
I am working on a web app where i needed to update the postgres(12) database. i am using flask-migrate for the purpose. i have tried to
Why does my sql multi-row insertion query contain a syntax error?
I am processing a post request with nodejs on heroku and trying to insert the json into a postgres db. const client = await
Intercepting knex.js queries pre-execution
I'm working on caching strategies for an application that uses knex.js for all sql related stuff. is there a way to intercept the query to check
allowNull:false and required:true did not validate null string input
My app is running nodejs 10.16 and sequelizejs 5.7 with postgresql 11. the initial connection is setup as: const sql =
Full text search with Laravel and Postgresql
I try to do a full text search, but i got stuck in a error. migration: public function up() {
Knex.js PostgreSQL column reference "id" is ambiguous
I am trying to select a single item from a collection in my database using knex.js, but getting the error column reference "id" is
Ad
Default value in Knex migration for an specific type of text array not working
I am creating a database migration using knex (v0.19.5) and postgresql (v10.1) but when i try to set the default value to a text
Mapping data in Laravel
I am not able to understand the response for api in laravel, it is confusing. i expect this output {
Postgres Issue: prompt has changed
Test=# select count(id) from person' test'#
Postgresql how do I aggregate the data in a table to produce a summarized table with unique values in a range
So, i am new to postgresql. my data is as follows: product wknum sales hammer 1 17 hammer 2 20 hammer 3 17 hammer 4 10
PostgreSQL conditional select throwing error
I have a postgresql database hosted on heroku which is throwing me this error that i can't wrap my head around. create table people
Potsgres SQL: select timestamp prior to max timestamp
I have a table in postgres with timestamps: timestamp 2022-01-01 00:52:53 2022-01-01 00:57:12 ... 2022-02-13 11:00:31 2022-02-13
Fetch users posts count in laravel
I have for me hard but for you very easy problem.i have jobs table and users table and i want to fetch users jobs count from database.
PostgreSQL error when run migration Lumen/Laravel
I recently changed the way my application connects to my postgresql database to add the
Select distinct name and number from a table and show it to the drop down box, then save how can i do?
I want to select distinct name and number from a table and show it to the drop down box, then save. how can i do?
How to get masklen from model
The model as below to store the ip address in postgres. from django.db import models from netfields import inetaddressfield,
How to let Chroniker update my table in a cronjob?
I have an issue with my postgresql database, i'm running my app in a container. i have a custom command in my django app working minutely, when it
Ad
PonyORM many-to-many relationship on defined schema in postgreSQL
I have question regarding ponyorm and many-to-many relationship. i'm using python3.7, ponyorm and postgresql db. setup: i have two schemas
Postgres ECONNREFUSED on Docker Compose with NodeJS
I get an econnrefused when trying to connect to a postgres server in docker from a nodejs app in docker when running both via docker-compose.
JSON stringify and PostgreSQL bigint compliance
I am trying to add bigint support within my library,
could not find driver (SQL: select * from ".." where ".." = user limit 1) , Services 'app' failed to build when run docker-compose build at vscode cli
I'm getting failed when building app 403 forbidden, how can i resolve this? i already search for some solution but isn't works. maybe i get wrong
How to connect Postgresql in Laravel project
I tried to connect postgresql and laravel i can see all data on pgadmin. but i can't connect the postgresql on laravel project please help me
How to change time zome in different tables in Laravel
Can you give an idea? i have two tables in to postgresql db. the are filled with recods by two separate csv files. but the records of the first
Encrypt postgres data using nodejs/sequelize
I've created a public key and stored it in my database. now i'm trying to insert encrypted data that is encrypted using the public key.
How to append nodejs sequelize model list of json field
How to append a list of json filed in nodejs sequelize database: postgres i have one model field like that
extract quarter from date field and display like Q4:YYYY format in query results
Trouble with formatting using to_char extract (quarter from reviewedon) as quarter returns 4 i need it to display as
How to get value from the second table if it's null in the first one
I have a little issue with a sql query. so. i have three tables: artists, albums and songs.
How to combine 2 tables in query SQL and convert to JSON
I have these tables albums (id integer, name text, year text) songs (id integer, title text, year text, performer text,
Ad
Joining Table Laravel Combined with JQuery and AJAX request
I want to join some of tables and getting the data to display into datatables, i'm recently using yajra datatables. here list of tables
Count not null json key->values in postgres table
I have a postgres table with a field requirements (json field). i need to count the not null keys in the json. what would be the best approach?
Why Sequelize migration create table but models can not connect to a database
I am learning how to use sequelize orm in nodejs and save data in postgres database. my goal is to insert user data into
Hashed pass, compare the result
I have a postgres datbase with a node backend. let hash = bcrypt.hashsync("mypass", 10); try { const querystring = `
NodeJS Sequelize: Association with alias [alias] does not exist on [model]
I'm using nodejs & sequelize for a school project and i'm struggling on making associations w/ sequelize work. i tried a couple of things
Update request ManyToMany NestJS
I'm quite new on coding, i am using nestjs to create an app along with postegresql whenever i try to update something i get an error. i
TYPEORM filtering data of a complex JSON
I am retrieving below data from postgres using typeorm and i want to filter this data: [{ "corporateid": 1001, "customerdetail":
Set new fields' value after database migration in LoopBack 4
Loopback has easy way to deal with database migrations, which differs from the method that uses, for example, knex.js. in the
Failed to loading node_modules in Google Cloud Function (index.js, not on the project root)
So i need to deploy a google cloud function to make a select request on a postgresql database (cloud sql). i need to use the pg module, then i
db-migrate insert data from csv
I need to insert data in to my postgresql via db-migrate for my serverless app. so i have 4 table and each table has it's own csv data. due to the
Sequelize: query to include a parent model's data if it has associated children; don't return the child model's data
In my node.js app using sequelize with a postgresql database i have defined three models: users, baskets, and items. the users model has many
Ad
Problem with the connection between postgresql and flutter
So i'm developing a flutter project that interact with postgresql database with dart and i have a problem with the connection between postgresql
How do I fix an "open handles" error in a Jest DB fixtures function?
I'm writing some jest tests for a node/postgres web app. here's the fixtures helper file: /*eslint no-console: ["error",
Postgresql how to group the values in on column of a table and transpose the unique values of another column in the same table, and sum up the rows
I am new to sql in general, hence this problem is a little tricky to me. i have a table like the example below: input values:
SQL query help: total people living in each province
I am using postgresql and windows. i have an sql query issue for which i need some help. the table diagram:
SQL query: choosing only the first word in a column
I am using postgresql and windows. i have column data that looks like this:
Laravel Deployment : PHP Error Unable to load dynamic library 'pdo_pgsql'
I want to deploy my laravel app in ubuntu server 18 lts. so i have install nginx postgres php. but when i try to do php artisan
How to connect a Database to an Angular Web Application?
I want to display and edit data from a existing postgresql database in an angular web application. i am completely new to angular and stuff. i
Import sql file with template literal variables and execute with knex raw
I have a large sql query that i'd like to move into a .sql file and then import and execute using knex.raw(). so i have
How to use split_part of postgresql inside laravel?
I want to use split_part inside laravel. my code
Possible to add dynamic WHERE clause with a QueryFile?
I have a complex query stored in an sql file and i would like to reuse it for various routes but change up the where clause depending on the
Postgres + NodeJS inserts, but doesn't end the script
I have this script, that consumes a soap xml, makes it a json, and use it to load data on a postgresql db for grafana. on my main script,
Ad
Subquery help Postgre
I have 2 tables in my schema: 1 - covid_data (relevant columns: country, year, week, cases). data example:
Postgresql return zero-length delimited error
I am trying to make a connection with postgresql 12 for laravel framework. i use laravel 5.8 version. when i try to login a user by using
Ad
Blog Categories
Ad