Feature: give pg_dump a WHERE clause expression
| От | Davy Durham |
|---|---|
| Тема | Feature: give pg_dump a WHERE clause expression |
| Дата | |
| Msg-id | 1212299813.17810.17.camel@ubuntu обсуждение исходный текст |
| Ответы |
Re: Feature: give pg_dump a WHERE clause expression
|
| Список | pgsql-patches |
Greetings, I have developed a fairly simple patch to the pg_dump utility. It is against version 8.3.1 source code. I have added a new parameter, -w/--where=EXPR This lets you specify an expression that will be used in a WHERE clause when the data is dumped. I have implemented and tested that it works when generating either COPY statements (the default), or INSERT statements (-d and -D). These two modes of operation have two different sections of code that select the data to be dumped. Though this change could arguably be removed, when a -w/--where expression is specified, it is also indicated in the comments of the dump output so one viewing the dump can see that it was not necessarily all of the data. When -w/--where is not specified, the dump output is just as if this patch had not been applied. I've also updated the pg_dump.sgml file to add a description of this new flag. The code changes should also conform to the existing code style within pg_dump. The patch should be applied from the root of the source tree with a -p1 option to the patch command. Please give any feedback if the patch needs improvement Thanks for a great DB!
Вложения
В списке pgsql-patches по дате отправления: