Some fix with export definition. Works now with pgql too.