Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Brad T. Sliger
On Tuesday 12 January 2010 01:06:22 Takahiro Itagaki wrote: Psql shows too many parentheses when it prints triggers with WHEN clause. postgres=# \d t1 Table public.t1 Column | Type | Modifiers +-+--- c1 | integer | Triggers: mytrig AFTER UPDATE

Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Takahiro Itagaki
Brad T. Sliger b...@sliger.org wrote: I tried to apply this patch to the latest version of PostgreSQL in git (bbfc96e). Some of the patch did not apply. Please find attached the output from patch. The full path of the ruleutils.c.rej is src/backend/utils/adt/ruleutils.c.rej The attached

Re: [HACKERS] Pretty printed trigger in psql

2010-01-18 Thread Brad T. Sliger
On Monday 18 January 2010 16:40:07 Takahiro Itagaki wrote: Brad T. Sliger b...@sliger.org wrote: I tried to apply this patch to the latest version of PostgreSQL in git (bbfc96e). Some of the patch did not apply. Please find attached the output from patch. The full path of the

Re: [HACKERS] Pretty printed trigger in psql

2010-01-13 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: The attached patch eliminates unneeded parentheses by using pg_get_triggerdef(pretty = true) in psql. Is this patch reversed? It seems so but the listed file timestamps don't match that idea ... regards, tom lane

Re: [HACKERS] Pretty printed trigger in psql

2010-01-13 Thread Takahiro Itagaki
Tom Lane t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: The attached patch eliminates unneeded parentheses by using pg_get_triggerdef(pretty = true) in psql. Is this patch reversed? It seems so but the listed file timestamps don't match that idea ...

Re: [HACKERS] Pretty printed trigger in psql

2010-01-13 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: Tom Lane t...@sss.pgh.pa.us wrote: Is this patch reversed? It seems so but the listed file timestamps don't match that idea ... Sorry, I cannot understand what you mean... The patch looks like it removes, rather than adds, your

[HACKERS] Pretty printed trigger in psql

2010-01-12 Thread Takahiro Itagaki
Psql shows too many parentheses when it prints triggers with WHEN clause. postgres=# \d t1 Table public.t1 Column | Type | Modifiers +-+--- c1 | integer | Triggers: mytrig AFTER UPDATE ON t1 FOR EACH ROW WHEN ((old.c1 new.c1)) EXECUTE PROCEDURE