Linked Questions

0 votes
1 answer
343 views

I am connecting my dropwizard application with the Postgres db. I am creating tables dynamically at the time of starting the application server. private static void createTableUser(Connection ...
Shubham Bhewanewala's user avatar
0 votes
0 answers
18 views

I have a situation, where new patients can be created through multiple portals simultaneously. I am working in PostgreSQL DB. Thanks in Advance. VD. Currently we are considering MAX(id) and ...
user22441691's user avatar
314 votes
7 answers
368k views

I have a PostgreSQL table with existing data. How do I add an auto-incrementing primary key without deleting and re-creating the table?
xRobot's user avatar
  • 26.7k
42 votes
4 answers
77k views

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 INTEGER NOT NULL AUTO_INCREMENT, ...
Jimmy's user avatar
  • 857
4 votes
4 answers
3k views

In my Rails 4 app, which I am using on Heroku for production, I have set up a seeds.rb file for the initial set of data. As it is critical that a few records have specific primary ids, say in the '...
steel's user avatar
  • 12.7k
2 votes
2 answers
3k views

I have a postgres database that I am accessing via Python using the psycopg2 library. The table I am attempting to insert into looks like this: ...
Shiri's user avatar
  • 2,112
1 vote
5 answers
1k views

We have a code that inserts a new value into the table column that is a primary key. First we are doing select and if this value is not present then we do insert. query = "SELECT AValue from ...
Alex's user avatar
  • 7,619
2 votes
1 answer
3k views

According to this documentation, PostgreSQL doesn't support unsigned integers. While I get that it makes the type resolution system less complicated, I don't see how this is practical for let's say ...
Peter Willemsen's user avatar
1 vote
1 answer
3k views

I'm using Spring JdbcBatchItemWriter to flush lots of data to a postgres DB. INSERT INTO customer (id, name, zip) VALUES (?,?,?) I only set name + zip as I want the id to be auto generated. But how ...
membersound's user avatar
  • 87.9k
0 votes
2 answers
2k views

I am trying to insert a single value into a Postgres table with two columns. The first column is an auto-increasing primary key while the second column should be a variable. I have done some research ...
Confusion Matrix's user avatar
1 vote
1 answer
3k views

I have taken over an existing Rails 3.2.9 app and am trying to set it up on my local windows 7 machine, but am getting the following error when trying to register a user: ActiveRecord::...
daz13's user avatar
  • 245
1 vote
1 answer
2k views

So I created an sql script with a lot of data in it that I ran in a postgresql Database. I use the Doctrine2 ORM inside the application to handle the database. The problem I would like to fix is as ...
Arnaud Rochez's user avatar
1 vote
1 answer
976 views

I am attempting to introduce multi-language support into the back end of an application, and trying to figure out a strategy to efficiently implement this into the current schema. I currently have ...
pjad's user avatar
  • 11
0 votes
2 answers
843 views

how can execute a sequence in JpaRepository? and then read the id from the Entity. public interface EmailRepository extends JpaRepository<Email, Long> { } emailService....
user avatar
1 vote
2 answers
562 views

I am relatively new to Slick and I keep getting the org.postgresql.util.PSQLException: ERROR: null value in column "id" violates not-null constraint message. I found plenty of examples with Slick 1.x ...
Daghan ---'s user avatar
  • 1,147
0 votes
2 answers
430 views

I have been battling with this for the last few days and am at the end of my tether. Please can someone help me figure out where/why I am going wrong. Thank you very much indeed. Here is my story: I ...
Lalin Pethiyagoda's user avatar