|
| 1 | +# PostgreSQL Git Foreign Data Wrapper |
| 2 | + |
| 3 | +git\_fdw is a a Git Foreign Data Wrapper for PostgreSQL written in C. |
| 4 | +It is making use of ]`libgit2`](libgit2.github.com). |
| 5 | + |
| 6 | +## INSTALLATION |
| 7 | + |
| 8 | +### Prerequisites |
| 9 | + |
| 10 | +* libgit2-dev |
| 11 | + |
| 12 | + |
| 13 | +### Setup |
| 14 | + |
| 15 | +Building git\_fdw is as simple as |
| 16 | + |
| 17 | + make |
| 18 | + |
| 19 | +and installing it only requires oneself to |
| 20 | + |
| 21 | + make install |
| 22 | + |
| 23 | + |
| 24 | +Now you can start setting up your environment to access git repositories: |
| 25 | + |
| 26 | + λ psql |
| 27 | + psql (9.3.5) |
| 28 | + Type "help" for help. |
| 29 | + |
| 30 | + franck=# CREATE EXTENSION git_fdw; |
| 31 | + CREATE EXTENSION |
| 32 | + |
| 33 | + franck=# CREATE SERVER git_fdw_server FOREIGN DATA WRAPPER git_fdw; |
| 34 | + CREATE SERVER |
| 35 | + |
| 36 | + franck=# CREATE FOREIGN TABLE rails_repository (message text, author text) SERVER git_fdw_server OPTIONS (path '/home/franck/rails/.git'); |
| 37 | + CREATE FOREIGN TABLE |
| 38 | + |
| 39 | + franck=# SELECT * FROM rails_repository LIMIT 10; |
| 40 | + message | author |
| 41 | + ----------------------------------------------------------+---------------------------------------------------------- |
| 42 | + Revert "Merge pull request #15312 from JuanitoFatas/acti | Matthew Draper <matthew@[REDACTED].net> |
| 43 | + Merge pull request #16908 from y-yagi/change_activejob_t | Abdelkader Boudih <terminale@[REDACTED].com> |
| 44 | + Change ActiveJob test directory to "test/jobs" +| yuuji.yaginuma <yuuji.yaginuma@[REDACTED].com> |
| 45 | + | |
| 46 | + Merge pull request #16669 from aantix/dangerous_attribut | Rafael Mendonça França <rafaelmfranca@[REDACTED].com> |
| 47 | + Changed the DangerousAttributeError exception message to | Jim Jones <[email protected]> |
| 48 | + Prepare maintenance policy for 4.2 release [ci skip] +| Rafael Mendonça França <rafaelmfranca@[REDACTED].com> |
| 49 | + | |
| 50 | + Se the test order of activejob tests +| Rafael Mendonça França <rafaelmfranca@[REDACTED].com> |
| 51 | + | |
| 52 | + Change gid calls to to_gid +| Rafael Mendonça França <rafaelmfranca@[REDACTED].com> |
| 53 | + | |
| 54 | + Merge pull request #16897 from kostia/message-varifier-r | Rafael Mendonça França <rafaelmfranca@[REDACTED].com> |
| 55 | + Changes "if secret.nil?" to unless secret in MessageVerf | Kostiantyn Kahanskyi <kostiantyn.kahanskyi@[REDACTED].co |
| 56 | + (10 rows) |
| 57 | + |
| 58 | + |
| 59 | +It is not possible to access multiple repositories through the same foreign |
| 60 | +table. We suggest the usage of views if this is something that needs to be |
| 61 | +achieved. |
| 62 | + |
| 63 | +## CONFIGURATION |
| 64 | + |
| 65 | +### Server |
| 66 | + |
| 67 | +There are no options that can be passed to a git\_fdw server. |
| 68 | + |
| 69 | +### Foreign Table |
| 70 | + |
| 71 | +The possible options are: |
| 72 | + |
| 73 | +* `path`: The path of the git repository; |
| 74 | + |
| 75 | + |
| 76 | +# Note on Patches/Pull Requests |
| 77 | + |
| 78 | +* Fork the project. |
| 79 | +* Make your feature addition or bug fix. |
| 80 | +* Add tests for it. This is important so I don't break it in a future version unintentionally. |
| 81 | +* Commit, do not mess with version or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) |
| 82 | +* Send me a pull request. Bonus points for topic branches. |
| 83 | + |
| 84 | +## LICENSE |
| 85 | + |
| 86 | +Copyright (c) 2014 Franck Verrot. MIT LICENSE. See LICENSE.md for details. |
0 commit comments