where to add/change commands
Hi folks
I am trying to make CLUSTER command just a bit verbose,as an option
here. Added bits to gram.y that should support CLUSTER [VERBOSE] ...
but psql doesn't seem to pick it up.
Where else do I need to update it, besides gram.y, cluster.c and of
course adding new field to ClusterStmt.
I tried seaching the list for such hints, but didn't found anything
usefull.
thanks.
--
Grzegorz Jaskiewicz
gj@pointblue.com.pl
C/C++ Freelance to hire.
Grzegorz Jaskiewicz wrote:
I am trying to make CLUSTER command just a bit verbose,as an option
here. Added bits to gram.y that should support CLUSTER [VERBOSE] ... but
psql doesn't seem to pick it up.
psql? There's some code to detect commands that can't be run in a
transaction block in src/bin/psql/common.c, maybe that's what you're
looking for.
Or did you mean something else? How doesn't it "pick it up"?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
On Mar 15, 2007, at 11:36 AM, Heikki Linnakangas wrote:
Grzegorz Jaskiewicz wrote:
I am trying to make CLUSTER command just a bit verbose,as an
option here. Added bits to gram.y that should support CLUSTER
[VERBOSE] ... but psql doesn't seem to pick it up.psql? There's some code to detect commands that can't be run in a
transaction block in src/bin/psql/common.c, maybe that's what
you're looking for.
meaning that if I type in "CLUSTER VERBOSE" in psql, I get syntax error.
Or did you mean something else? How doesn't it "pick it up"?
well, probably patch's worth 1000 words. Hope that attaching such
small file isn't a crime in the neck'o'woods.
Attachments:
clusterverbose.patchapplication/octet-stream; name=clusterverbose.patch; x-unix-mode=0644Download+22-10
Hi,
psql? There's some code to detect commands that can't be run in a
transaction block in src/bin/psql/common.c, maybe that's what you're
looking for.Or did you mean something else? How doesn't it "pick it up"?
I think he probably meant that he was getting a syntax error, even after
making all the changes.
Grzegorz, I would have suggested to make an entry for VERBOSE in
parser/keywords.c, but it already seems to contain an entry for VERBOSE. I
hope you are using the "opt_verbose" rule in your gram.y in the CLUSTER
[VERBOSE] case.
Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com
On Mar 15, 2007, at 11:46 AM, NikhilS wrote:
Grzegorz, I would have suggested to make an entry for VERBOSE in
parser/keywords.c, but it already seems to contain an entry for
VERBOSE. I hope you are using the "opt_verbose" rule in your gram.y
in the CLUSTER [VERBOSE] case.
sure I am. My 'bison' skills are not very high, but I was trying to
mimic 'VACUUM' syntax there. see the patch.
--
Grzegorz Jaskiewicz
gj@pointblue.com.pl
C/C++ freelance to hire
Grzegorz Jaskiewicz wrote:
meaning that if I type in "CLUSTER VERBOSE" in psql, I get syntax
error.
Your patch works perfectly fine for me.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
On Mar 15, 2007, at 12:26 PM, Peter Eisentraut wrote:
Your patch works perfectly fine for me.
Ok, I'll try make distclean/make -j2/sudo make install, reboot and
will see.
I was kinda beliving that remaking whole thing from scratch over and
over again wouldn't be a necessity here.
thanks.
--
Grzegorz Jaskiewicz
C/C++ freelance for hire
"Grzegorz Jaskiewicz" <gj@pointblue.com.pl> writes:
On Mar 15, 2007, at 12:26 PM, Peter Eisentraut wrote:
Your patch works perfectly fine for me.
Ok, I'll try make distclean/make -j2/sudo make install, reboot and will see.
I was kinda beliving that remaking whole thing from scratch over and over again
wouldn't be a necessity here.
thanks.
You may want to configure with --enable-depend. It shouldn't be necessary to
get make to notice changes to gram.y but perhaps your problem lies elsewhere.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
ok, it works okay.
Thanks.
I am really serious about adding this patch. I would like it to not
only show which tables/indices are being clustered, but also some
sort of progress information (print procentage of job being done, etc).
Any hints, as on what might be useful for others. Perhaps there's a
slim chance I could offer it to mainline?
--
Grzegorz Jaskiewicz
C/C++ freelance for hire