Josh Kupershmidt
d1ab1f7882
Check "relkind" instead of "reltype" in pg_class for clarity.
2013-07-08 09:20:40 -04:00
Josh Kupershmidt
b804c150ac
Fix existing 'tablespace' regression test so it passes again.
...
Changes to repack_indexdef() had broken this test.
2013-06-22 06:47:06 -04:00
Josh Kupershmidt
f3fa2fa563
Fixes and cleanup of the new repack_index_swap():
...
* Make sure we don't crash if this function is fed a bogus OID
* rename idx1, idx2 variables for clarity
* tweak query against pg_class to specify reltype = 0
* CommandCounterIncrement() is probably unnecessary, removed
2013-06-21 20:58:54 -04:00
Josh Kupershmidt
ee23ec8ffd
Initial import of indexes-only building patch.
...
Patch from Beena Emerson.
2013-06-21 18:41:09 -04:00
Daniele Varrazzo
20dea46184
Merge remote-tracking branch 'piro/master'
2013-05-05 00:19:22 +01:00
Daniele Varrazzo
a561c924f7
Parse tablespace/where in parse_indexdef
...
Makes injecting the target tablespace much easier and fixes interaction
between tablespace and WITH/WHERE clauses.
Added tests to check the correct indexes definition.
2013-05-05 00:07:14 +01:00
Daniele Varrazzo
cc2abf4b25
Fixed tablespace assignment in index with WITH clause
...
Reported by Beena Emerson.
2013-05-02 23:32:30 +01:00
Josh Kupershmidt
c55c613e44
Update RENAME_REL macro to work with 9.3. We now need to pass the
...
"is_internal" boolean to this function; for our purposes it should
be acceptable to always pass true.
2013-04-23 21:32:30 -04:00
Daniele Varrazzo
109689586e
Fixed access to uninit'd mem in repack_indexdef
...
If the tablespace is the last token in the indexdef, skip_ident returns a
pointer *after* the term zero, so garbage may end up after the statement.
2013-04-22 00:48:53 +01:00
Daniele Varrazzo
d98a14bb55
Fixed index definition tokenization
...
In the previous commit skip_const was going ahead the space thus removing the
starting quote. Also fixed (and tested) trailing part after the tablespace
name, e.g. the WHERE clause.
2013-04-16 23:23:26 +01:00
Daniele Varrazzo
83fdb2a9e0
Added implementation for --moveidx
...
Note: if original namespace is "foo bar", repack_indexdef gives a bad
result. This is weird as apparently skip_ident can deal with spaces in
a quoted identifier. Committing as I'm going home, will deal with that
later.
2013-04-16 22:42:23 +01:00
Daniele Varrazzo
13cf8679db
Added support for COLLATE to index keys
2012-12-09 12:02:49 +00:00
Daniele Varrazzo
4bcb7641c9
Function get_index_keys() renamed to get_order_by()
...
It was a FIXME item in the source. Reasonably so.
2012-12-09 11:35:52 +00:00
Daniele Varrazzo
a47686a7ee
Added support for DESC and NULLS FIRST/LAST to index keys
...
Fixes issue #3
2012-12-09 01:11:39 +00:00
Josh Kupershmidt
95c196dd33
Have get_quoted_relname(), get_quoted_nspname(), and reorg_drop() sanity check arguments to prevent NULL pointer dereferencing and backend crash.
...
Fix for Issue #20 .
2012-11-11 23:09:59 +00:00
Daniele Varrazzo
7b84eeb010
Get the program and library version from the META file
2012-11-11 18:30:27 +00:00
Daniele Varrazzo
1d60a946ff
Added The Reorg Development Team copyright
2012-11-11 03:00:00 +00:00
Daniele Varrazzo
db1c554f60
Dropped executable flags
2012-11-11 02:48:46 +00:00
Daniele Varrazzo
b7799c1782
Fork the pg_repack extension
2012-11-10 22:33:57 +00:00