Fork me on GitHub
#sql
<
2020-04-02
>
nha14:04:30

["INSERT INTO t (a, b) VALUES (?, ?)" 1 "DEFAULT"]
How can I insert something like that when by “DEFAULT” I mean the SQL DEFAULT without quotes (not a string, a SQL keyword) ? I have a similar problem with a PostGIS type (`geography`) but I think the issue is the same.

kirill.salykin14:04:16

you just don’t insert b - and db will use default value

nha15:04:03

I am aware - however my real issue is with the postgis data, I just think this is the same problem

nha14:04:06

I am looking at PGobject.setType but I can’t find a suitable type

nha14:04:29

having a look at postgis-java

dharrigan18:04:23

postgis java is at 2.5.0

dharrigan18:04:27

came out a few days ago

dharrigan18:04:43

4 to be precise

nha18:04:30

yes, seems that it works (at least I can insert data)

nha19:04:17

org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections
I am using a component reloaded workflow. After some time when reseting I get the above. Does that mean I am not closing my connections properly on stop?

codonnell20:04:08

That's likely the explanation, yeah.