[HACKERS] expression evaluation with expected datatypes

2012-07-08 Thread Pavel Stehule
Hello When I worked on parametrised DO statement, I had to solve following issue: Syntax is: DO (param list) $$ ... $$ LANGUAGE ... USING expr_list What is correct way for evaluation of expr_list with specified target types? I used two techniques: 1) evaluation expressions -

Re: [HACKERS] Schema version management

2012-07-08 Thread Joel Jacobson
On Saturday, July 7, 2012, Tom Lane wrote: If we think that operators outside of extensions will be an infrequent special case, what about just dumping all of them into a single file named operators? And similarly for casts? regards, tom lane +1

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-08 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: When I worked on parametrised DO statement, I had to solve following issue: Syntax is: DO (param list) $$ ... $$ LANGUAGE ... USING expr_list What is correct way for evaluation of expr_list with specified target types? I'd argue that that's a

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-08 Thread Pavel Stehule
2012/7/8 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: When I worked on parametrised DO statement, I had to solve following issue: Syntax is: DO (param list) $$ ... $$ LANGUAGE ... USING expr_list What is correct way for evaluation of expr_list with specified

Re: [HACKERS] Schema version management

2012-07-08 Thread Peter Eisentraut
On lör, 2012-07-07 at 11:32 -0400, Aidan Van Dyk wrote: But, since you're using operators, what would you think is an appropriate name for the file the operator is dumped into? The name of the operator, just like for any other object. (Assuming we're using the name of a table for the file for

Re: [HACKERS] Schema version management

2012-07-08 Thread Peter Eisentraut
On lör, 2012-07-07 at 17:18 -0400, Tom Lane wrote: Sure. You need not look further than / to find an operator name that absolutely *will* cause trouble if it's dumped into a filename literally. But that problem applies to all object names. If we think that operators outside of extensions

Re: [HACKERS] regex_fixed_prefix() is still a few bricks shy of a load

2012-07-08 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Jul 7, 2012, at 1:46 PM, Tom Lane t...@sss.pgh.pa.us wrote: 3. Try another approach entirely. The idea that I've got in mind here is to compile the regex using the regex library and then look at the compiled NFA representation to see if there must

Re: [HACKERS] Schema version management

2012-07-08 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On lör, 2012-07-07 at 17:18 -0400, Tom Lane wrote: Sure. You need not look further than / to find an operator name that absolutely *will* cause trouble if it's dumped into a filename literally. But that problem applies to all object names. In

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-07-08 Thread Tatsuo Ishii
Tatsuo Ishii is...@postgresql.org writes: So far as I can see, the only LCPRVn marker code that is actually in use right now is 0x9d --- there are no instances of 9a, 9b, or 9c that I can find. I also read in the xemacs internals doc, at

Re: [HACKERS] pgsql_fdw in contrib

2012-07-08 Thread Kohei KaiGai
2012/7/5 Shigeru HANADA shigeru.han...@gmail.com: In addition, is pull_var_clause() reasonable to list up all the attribute referenced at the both expression tree? It seems to be pull_varattnos() is more useful API in this situation. Only for searching, yes. However, sooner or