Comments (4)
Thanks, I'll take a look. Could you share the CREATE
statement used for the normal.person
table?
from postgres-nio.
Here's my create statement:
create schema if not exists normal;
set search_path to normal;
create table person(id serial primary key, first_name text, last_name text);
This is what Postgres generates (if it helps):
CREATE TABLE normal.person
(
id integer NOT NULL DEFAULT nextval('normal.person_id_seq'::regclass),
first_name text COLLATE pg_catalog."default",
last_name text COLLATE pg_catalog."default",
CONSTRAINT person_pkey PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE normal.person
OWNER to postgres;
from postgres-nio.
Ah, I see. Thanks for the detailed response. serial
is a 32-bit integer, so Postgres is giving a confusing error about the parameter not being the right width. Here are some solutions:
- Use
bigserial
- Use
bigint
withgenerated by default as primary key
- Use
PostgresData(int32: 5)
from postgres-nio.
Option 3 did the trick with the least amount of hassle. Thanks for your help and for providing this elegant library. Closing.
from postgres-nio.
Related Issues (20)
- Support marking connection as going away
- Support changing the number of allowed streams on a connection HOT 1
- Error "How can we receive a read, if the connection is closed" HOT 7
- Double ping pong that crashes the app. HOT 2
- Connection Pool Crash: Precondition failure when ping and close happen at the same time
- ConnectionPool: Allow connection scoring/preference, for example for a certain EventLoop HOT 1
- Fatal error: How can we receive a read, if the connection is closed HOT 3
- TIMESTAMP columns don't return the same value as was inserted HOT 3
- PostgresNIO/ListenStateMachine.swift:182: Fatal error: Invalid state: initialized HOT 12
- DATE columns set values with timezone offsets, producing conflicts when db server is on a different timezone. HOT 5
- Get count of active connection HOT 6
- Empty Set does not encode property
- ConnectionPool crash on keepalive with non-empty request queue HOT 2
- Rename `PostgresQuery` to `PostgresStatement`
- ConnectionPool crash when minimum connections > 0
- Database cursor support HOT 1
- Empty Query Triggers Precondition Failure
- Constantly retrying/never failing request to unreachable database HOT 6
- Can you please add Musl to cross compile? HOT 2
- Difficult to debug tests with db methods due to masked error messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres-nio.