Closed sirherrbatka closed 2 years ago
We have had a question for a long time whether we should be returning nil or an empty array in this situation and had tentatively decided to return nil. If you change cl-postgres/interpret.lisp line 225 from
nil)
to
(make-array 0))
and recompile cl-postgres (not just the function read-binary-array-value) does that do what you want?
Yeah. That would do the trick.
If I could point out why this is an issue for me: I am using cl-postgres to dump content of a database and restore those dumps in others. It was a bit surprising to see that I can't insert what I've just selected from database foo into a database bar with a matching schema.
Done
Oh, I managed to convince a developer. That's a new experience for me!
Seriously though, thanks! I really appreciate it.
for instance
(postmodern:with-connection pg-connection (postmodern:query "select array[]::integer[]")) will return ((NIL))
Where it should be #()