gtfs-via-postgres
gtfs-via-postgres copied to clipboard
`valid_default_lang` error with languages like "DE"
ERROR: new row for relation "feed_info" violates check constraint "valid_default_lang"
Was fixed by changing feed_lang from en to en_US.utf8 but en seems to be used in the example amtrak GTFS and in BART.
AFAICT, en is a valid BCP 47 language tag, so it should not cause gtfs-via-postgres to fail.
This is the current implementation of the validation: https://github.com/public-transport/gtfs-via-postgres/blob/6a022f24dcb166fc9daee967739026c7d356e67d/lib/prerequisites.js#L5-L22
I'm not that familiar though, with the details of how PostgreSQL handles localisation, so I don't know how to implement this properly.
FYI: I also got the same error. For me it was fixed with replacing "DE" by "de".