cpicpgx / cpic-data

CPIC Data definitions and code to use that data
Other
26 stars 2 forks source link

[minor]PostgreSQL version #4

Closed wenjiany closed 4 years ago

wenjiany commented 4 years ago

While loading the CPIC data to our current Postgre Server running v10.*, we encountered error "ERROR: syntax error at or near "FUNCTION"".

There are a few trigger functions for versioning: "CREATE TRIGGER ... FOR EACH ROW EXECUTE FUNCTION public.increment_version()".

"EXECUTE FUNCTION" was introduced in Postgres 11.*, would have been "EXECUTE PROCEDURE" in earlier versions.

I think there a few options:

  1. change to "EXECUTE PROCEDURE" for compatibility even though "EXECUTE FUNCTION" is now preferred way.
  2. state that "PostgreSQL version 11 or above" is required.
  3. remove the trigger function, as this is probably not something the end user need?

Thanks.

whaleyr commented 4 years ago

Good point, thanks. I'll update the docs to require PostgreSQL 11+.

These DB exports serve a couple of different purposes. First, it allows you to read what's going in the DB. But secondly, it's also a way for people to see how we do things and extend it for themselves under the Creative Commons license.