pg_sample icon indicating copy to clipboard operation
pg_sample copied to clipboard

wildcards don't seem to be working in "--limit"

Open alexandernst opened this issue 3 years ago • 1 comments

I'm trying to dump a Django project, so I did --limit="django_* = *,table_foo=15,*=15", which I was expecting to dump 15 rows from foo and all rows from all the tables that start with django_ (namely django_migrations and django_site). After inspecting the result I found out that only 15 rows were dumped from django_* tables.

alexandernst avatar Mar 27 '22 22:03 alexandernst

Try using --limit="django_.*=*" The left side is treated as a full regular expression.

I see the example in the docs is misleading: --limit="forums.* = *"

That should really be --limit="forums\..*=*"

mla avatar Mar 28 '22 05:03 mla