I have an Oracle database from which I am selecting a table from a remote postgres database, pg. The column mydate is of type date. select to_char(mydate,'mm-d
I'm populating a table like so: ... time_id = uuid.uuid4() location_id = uuid.uuid4() id = row['id'] sql = ''' INSERT INTO "my-schema"."example"(
I am just trying to write simple register/login system. I am trying to find if username exists. Here is the steps : Go localhost:3000/users/register page Fill i
I have postgres table with three variables: datetime, robot_id and energy_percent. Now at chart I have energy_percent and robot_id. How to group records from th
I have a requirement to translate it to an SQL script. I am using the information schema to get all the columns of a table and print their distinct count. I was
I'm building a javascript application using Bing Maps API, and I would like to make up sector geometries from center points and sector parameters. I have a tabl
I have a transactional table with year, month and amount. Now, there are months which we consider non-operating months (jan, feb, dec). However, SAP automatical
I'm running Arch Linux, I installed PostgreSQL as any other arch package. I'm running postgres with a local database located in my user directory. (postgres -D
I am working on a Linux server that is hosted on Amazon's server and I have completely set up the server. The final thing I am trying to do is host one of my ol
I'm trying to setup a working test DB with postgreSQL 13 by following a tutorial but I'm completely confused about which command really exists and which does no
I've searched a lot and this is deprecated question. I'm trying to bulk insert in a table. My approach was like this knex('test_table').where({ user: 'user@ex
I have Project objects that contain arrays of Tags (for example, Backend, Frontend, Sales, Marketing). The user sets the desired parameters, such as Backend and
I have a file that keeps failing to archive. The failed archive command was: test ! -f /mnt/wal_archive/archivedir/00000001000003F000000072 && cp pg_wal
I have a postgresql 9.3 instance that I am wanting to upgrade to postgresql 10. I have a command that I think should work but it includes checksums in it. My ol
Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in
Solved: Doing a vacuum on all of the old tables resolved the index issues. Autovacuum was never going to happen because they were all static. Simplest query tha
Trying to save a post on a django project I got this error The above exception (insert or update on table "django_admin_log" violates foreign key constraint "dj
I am trying to write a PostgreSQL function in C. My goal is finding minimum value of a list. So, my function will be executed like these: SELECT min_to_max(val)
I am using PostgreSQL 13 and has intermediate level experience with PostgreSQL. I have a table named tbl_employee. it stores employee details for number of cust
Table timestamp | tracker_id | position ----------------------------------+------------+---------- 2020-02-01 21:53:45.571429+05:30 |