pg_sample
pg_sample copied to clipboard
Add "flip" option to store most recent records
Example:
./pg_sample --ordered --flip <database_name>
./pg_sample --help
--ordered
Select from the table records after ordering the records by primary
key value.
--flip
When passed as an option, the records will be ordered by decreasing
primary key value. Will have an effect only if --ordered is also
passed as an option.
Thank you @jmborr! Will review and look at merge this weekend.
@mla do you have a moment to review this?
Sorry for delay @jmborr. Yes. I'm thinking we make your desc order the default. Seems likely that most ppl will want newest rather than oldest records anyway, and we had this issue come up recently elsewhere too.
@jmborr please see the latest changes on dev branch. I changed --ordered to default to DESC and added --ordered-desc and --ordered-asc to control that if wanted.
@mla Hi, sorry for not coming back earlier to this. I was on vacation and after that it was dealing with a big pile of work :sweat_smile:
I've taken a look to the dev
branch and I think I can close this PR since the functionality is now encoded in new options --ordered-desc
and --ordered-asc
, right?
Sorry for not responding @jmborr! Yes, I believe what you need is handled by those new options. I'll get a new release pushed out this weekend. Thx.