Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Heikki Linnakangas
On 27/05/10 22:55, Tom Lane wrote: Peter Eisentraut writes: How about select myfunc(a := 7, b := 6); ? Hey, that's a thought. We couldn't have used that notation before because we didn't have := as a separate token, but since I hacked that in for plpgsql's benefit, I think it might be an eas

[HACKERS] Patch submission deadline for CommitFest 2010-07

2010-05-27 Thread Fujii Masao
Hi, When is the patch submission deadline for CommitFest 2010-07? July 14? or June 14 (before review fest)? Sorry, I'm not sure what is actually different between CF and RF. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-ha

Re: [HACKERS] pg_trgm

2010-05-27 Thread Peter Eisentraut
On fre, 2010-05-28 at 10:04 +0900, Tatsuo Ishii wrote: > > I think the problem at hand has nothing at all to do with agglutination > > or CJK-specific issues. You will get the same problem with other > > languages *if* you set a locale that does not adequately support the > > characters in use. E

Re: [HACKERS] Streaming Replication: Checkpoint_segment and wal_keep_segments on standby

2010-05-27 Thread Sander, Ingo (NSN - DE/Munich)
Both nodes (active and standby) have the same configuration parameters. The observed effect happens too if the checkpoint timeout is decreaased. The problem seems to be that on standby no checkpoints are written and only the chekpoint_timeout mechanism is active Regards Ingo -Original Mess

[HACKERS] Working with PostgreSQL enums in C code

2010-05-27 Thread Joseph Adams
I encountered a situation while implementing JSON support where I needed to return an enum value from a C function. To clarify, here's the SQL: CREATE TYPE json_type_t AS ENUM ('null', 'string', 'number', 'bool', 'object', 'array'); CREATE OR REPLACE FUNCTION json_type(json) RETURNS json_type_t

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Tom Lane
Andrew Dunstan writes: > Bruce Momjian wrote: >> One concern I have is that in PL/pgSQL, := and = behave the same, while >> in SQL, they would not. That might cause confusion. > I doubt there will be much confusion. I agree. Bruce is ignoring the fact that they are *not* interchangeable even i

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Andrew Dunstan
Bruce Momjian wrote: Peter Eisentraut wrote: On tor, 2010-05-27 at 12:59 -0400, Tom Lane wrote: I think we should fix it now. Quick thought: maybe we could use FOR instead of AS: select myfunc(7 for a, 6 for b); I'm afraid FOR doesn't work either; it'll cr

Re: [HACKERS] mingw initdb failure on HEAD

2010-05-27 Thread Takahiro Itagaki
Andrew Dunstan wrote: > Several buildfarm mingw members are getting failures like this, when > running initdb: > > > Could it have been caused by the PGDLLIMPORT/PGDLLEXPORT changes? Probably, but it's curio

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Bruce Momjian
Peter Eisentraut wrote: > On tor, 2010-05-27 at 12:59 -0400, Tom Lane wrote: > > > I think we should fix it now. Quick thought: maybe we could use > > FOR > > > instead of AS: select myfunc(7 for a, 6 for b); > > > > I'm afraid FOR doesn't work either; it'll create a conflict with the > > spec-d

Re: [HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Mohammad Heykal Abdillah
On Jum, 2010-05-28 at 08:55 +0900, Tatsuo Ishii wrote: > > > Now to the question, why my manualy constructed list was failed to > > > execute? I was pretty sure that my list node was identical with yacc. > > > > Because you have a bug in your code. > > You can debug your code by comparing your h

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread Tom Lane
David Fetter writes: > I don't know about a *good* idea, but here's the one I've got. > 1. Make a whitelist. This is what needs to work in order for a > language to be a fully functional trusted PL. Well, I pretty much lose interest right here, because this is already assuming that every poten

Re: [HACKERS] tsvector pg_stats seems quite a bit off.

2010-05-27 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= writes: > On 19/05/10 21:01, Jesper Krogh wrote: >> In practice, just cranking the statistics estimate up high enough seems >> to solve the problem, but doesn't >> there seem to be something wrong in how the statistics are collected? > The algorithm to determine m

Re: [HACKERS] quoting and recovery.conf

2010-05-27 Thread Fujii Masao
On Fri, May 28, 2010 at 12:20 AM, Greg Stark wrote: > My suggestion is we should fold all the parameters into > postgresql.conf and treat recovery.conf as an additional > postgresql.conf to read. It would allow any GUC. The only difference > is that it would be moved out of the way automatically w

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread KaiGai Kohei
(2010/05/28 5:25), Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Stephen Frost writes: >>> Err, your question comes across to me like "if you added comments to >>> pg_depend, you'd only be able to use a given comment X for one object?". >>> Doesn't make alot of sense. :) >> >> W

Re: [HACKERS] Streaming Replication: Checkpoint_segment and wal_keep_segments on standby

2010-05-27 Thread Fujii Masao
On Thu, May 27, 2010 at 11:13 PM, Robert Haas wrote: >> I guess this happens because the frequency of checkpoint on the standby is >> too lower than that on the master. In the master, checkpoint occurs for every >> consumption of three segments because of "checkpoint_segments = 3". On the >> other

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread David Fetter
On Thu, May 27, 2010 at 09:51:30PM -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 7:10 PM, David Fetter wrote: > > On Fri, May 28, 2010 at 01:03:15AM +0300, Peter Eisentraut wrote: > >> On fre, 2010-05-21 at 14:22 -0400, Robert Haas wrote: > >> > On Fri, May 21, 2010 at 2:21 PM, Tom Lane wro

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread KaiGai Kohei
(2010/05/28 5:11), Robert Haas wrote: > On Thu, May 27, 2010 at 4:01 PM, Tom Lane wrote: >> Stephen Frost writes: >>> * Tom Lane (t...@sss.pgh.pa.us) wrote: I'm not real sure that you want a dependency for a security label anyway --- wouldn't that mean each label could only be used for

Re: [HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 6:56 PM, Mohammad Heykal Abdillah wrote: > On Kam, 2010-05-27 at 15:02 -0400, Robert Haas wrote: >> On Thu, May 27, 2010 at 1:58 PM, Mohammad Heykal Abdillah >> wrote: >> > Now to the question, why my manualy constructed list was failed to >> > execute? I was pretty sure t

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 7:10 PM, David Fetter wrote: > On Fri, May 28, 2010 at 01:03:15AM +0300, Peter Eisentraut wrote: >> On fre, 2010-05-21 at 14:22 -0400, Robert Haas wrote: >> > On Fri, May 21, 2010 at 2:21 PM, Tom Lane wrote: >> > > Robert Haas writes: >> > >> So... can we get back to comi

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread KaiGai Kohei
(2010/05/28 4:12), Stephen Frost wrote: > KaiGai, > > * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: >> As we talked at the developer meeting on Ottawa, it needs to provide >> a capability to assign a short text identifier on database objects >> to support label based ESP (such as SELinux). >> So, I

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> It's not a practical solution for people working with prebuilt Postgres > versions, which is most people. I don't object to finding a way to > provide a "not-space" behavior instead of an "is-alnum" behavior, > but as noted upthread a GUC isn't the right way. How do you feel > about a new set o

Re: [HACKERS] [PATCH] Add XMLEXISTS function from the SQL/XML standard

2010-05-27 Thread Bruce Momjian
Mike Fowler wrote: > Tom Lane wrote: > > Robert Haas writes: > > > >> On Tue, May 25, 2010 at 1:09 PM, Mike Fowler wrote: > >> > We're unlikely to accept this patch if it changes the minimum version > of libxml2 required to compile PostgreSQL > > >>> Why? 2.6.27 is

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> I think the problem at hand has nothing at all to do with agglutination > or CJK-specific issues. You will get the same problem with other > languages *if* you set a locale that does not adequately support the > characters in use. E.g., Russian with locale C and encoding UTF8: > > select simil

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> Tatsuo Ishii writes: > > similarity -> generate_trgm -> find_word -> iswordchr -> t_isalpha -> > > isalpha > > > if locale is C and USE_WIDE_UPPER_LOWER defined which is the case in > > most modern OSs. > > Quite. And *if locale is C then only standard ASCII letters are letters*. > You may n

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tom Lane
Tatsuo Ishii writes: > Or you could just #undef KEEPONLYALNUM in trgm.h. But I'm not sure > this is the right thing for you. It's not a practical solution for people working with prebuilt Postgres versions, which is most people. I don't object to finding a way to provide a "not-space" behavior i

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tom Lane
Tatsuo Ishii writes: > similarity -> generate_trgm -> find_word -> iswordchr -> t_isalpha -> isalpha > if locale is C and USE_WIDE_UPPER_LOWER defined which is the case in > most modern OSs. Quite. And *if locale is C then only standard ASCII letters are letters*. You may not like that but it's

Re: [HACKERS] List traffic

2010-05-27 Thread Tom Lane
Josh Berkus writes: > We do not have a problem. The lists are fine the way they are. +1 ... wasn't the point I thought you were trying to make, but I'm good with not changing things. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.or

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> > Problem with pg_trgm is, it uses isascii() etc. to recognize a letter, > > which will skip any non ASCII range character in C locale. > > The only place I see that is in those ISPRINTABLE macros, which are only > used in show_trgm(), which is just a debugging function. It could stand > to be

Re: [HACKERS] List traffic

2010-05-27 Thread Josh Berkus
Well, there's no free lunch. If we have a whole lot of "small" lists there are going to be two big downsides: fewer people reading each list (hence fewer answers), and many more arguably-misclassified postings, thus diluting the theoretical targetedness of the lists. You're missing my point.

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tom Lane
Tatsuo Ishii writes: > Problem with pg_trgm is, it uses isascii() etc. to recognize a letter, > which will skip any non ASCII range character in C locale. The only place I see that is in those ISPRINTABLE macros, which are only used in show_trgm(), which is just a debugging function. It could st

Re: [HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Tatsuo Ishii
> > Now to the question, why my manualy constructed list was failed to > > execute? I was pretty sure that my list node was identical with yacc. > > Because you have a bug in your code. You can debug your code by comparing your hand made tree with the original tree by using equal(). Search #ifdef

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> What I can't help wondering as I'm reading this discussion is - > Tatsuo-san said upthread that he has a problem with pg_trgm that he > does not have with full text search. So what is full text search > doing differently than pg_trgm? Problem with pg_trgm is, it uses isascii() etc. to recognize

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> I think the problem at hand has nothing at all to do with agglutination > or CJK-specific issues. You will get the same problem with other > languages *if* you set a locale that does not adequately support the > characters in use. E.g., Russian with locale C and encoding UTF8: > > select simil

[HACKERS] VPATH docs

2010-05-27 Thread David Fetter
Folks, Andrew Dunstan posted some instructions on his blog, and I'm thinking they clarify things a great deal for people who want to learn how to do VPATH builds. Attached patch adds the description along with an index term. What say? Cheers, David. -- David Fetter http://fetter.org/ Phone: +

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread David Fetter
On Fri, May 28, 2010 at 01:03:15AM +0300, Peter Eisentraut wrote: > On fre, 2010-05-21 at 14:22 -0400, Robert Haas wrote: > > On Fri, May 21, 2010 at 2:21 PM, Tom Lane wrote: > > > Robert Haas writes: > > >> So... can we get back to coming up with a reasonable > > >> definition, > > > > > > (1) n

Re: [HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Mohammad Heykal Abdillah
On Kam, 2010-05-27 at 15:02 -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 1:58 PM, Mohammad Heykal Abdillah > wrote: > > Now to the question, why my manualy constructed list was failed to > > execute? I was pretty sure that my list node was identical with yacc. > > Because you have a bug i

Re: [HACKERS] Synchronization levels in SR

2010-05-27 Thread Robert Haas
On May 27, 2010, at 4:31 PM, Bruce Momjian wrote: Heikki Linnakangas wrote: BTW, I think we're going to need a separate config file for listing the standbys anyway. There you can write per-server rules and options, but explicitly knowing about all the standbys also allows the master to recy

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread David Fetter
On Thu, May 27, 2010 at 02:55:54PM -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 1:27 PM, David E. Wheeler > wrote: > > On May 27, 2010, at 9:59 AM, Tom Lane wrote: > > > >>> I think we should fix it now.  Quick thought: maybe we could use FOR > >>> instead of AS: select myfunc(7 for a, 6 f

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread Peter Eisentraut
On fre, 2010-05-21 at 14:22 -0400, Robert Haas wrote: > On Fri, May 21, 2010 at 2:21 PM, Tom Lane wrote: > > Robert Haas writes: > >> So... can we get back to coming up with a reasonable > >> definition, > > > > (1) no access to system calls (including file and network I/O) > > > > (2) no access

[HACKERS] mingw initdb failure on HEAD

2010-05-27 Thread Andrew Dunstan
Several buildfarm mingw members are getting failures like this, when running initdb: creating conversions ... FATAL: could not load library "C:/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3584/src/test/regress/./tmp_check/install/home/pgrunner/bf/root/HEAD/inst/lib/postgresql/utf8_and_johab.d

Re: [HACKERS] Exposing the Xact commit order to the user

2010-05-27 Thread Jan Wieck
On 5/27/2010 12:01 PM, Jan Wieck wrote: On 5/27/2010 9:59 AM, Greg Stark wrote: This thread has been hard to follow for me. Were any of these questions answered? Yes. The thing missing is any sort of answer to that problem description. Jan -- Anyone who trades liberty for security deserv

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Kevin Grittner
>>>Joe Conway wrote: > (a) can work if it is all in one command, CREATE TABLE AS > SELECT... > Additionally we were discussing COPY in the FROM clause, which > means you could CREATE TABLE AS SELECT ... FROM (COPY ...). That > would allow bulk loading with hint bits already set (and tuples > f

Re: [HACKERS] Synchronization levels in SR

2010-05-27 Thread Bruce Momjian
Heikki Linnakangas wrote: > BTW, I think we're going to need a separate config file for listing the > standbys anyway. There you can write per-server rules and options, but > explicitly knowing about all the standbys also allows the master to > recycle WAL as soon as it has been streamed to all

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Err, your question comes across to me like "if you added comments to > > pg_depend, you'd only be able to use a given comment X for one object?". > > Doesn't make alot of sense. :) > > Well, one of us is confused. I thought the i

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Joe Conway
On 05/27/2010 12:39 PM, Robert Haas wrote: > On Thu, May 27, 2010 at 3:15 PM, Kevin Grittner > wrote: >> Jesper Krogh wrote: >> >>> Couldn't pages that are totally filled by the same transaction, be >> >>> frozen on the initial write? >> >> As far as I'm aware, that can only be done if: >> >> (a)

Re: [HACKERS] List traffic

2010-05-27 Thread alvherre
Excerpts from Josh Berkus's message of jue may 27 14:11:51 -0400 2010: > Only someone who is a postgresql developer would consider 15-30 > posts/day "small". For most of our user base, the level of traffic on > -performance, -sql, and -general is already too high and many people > don't subscribe

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 4:01 PM, Tom Lane wrote: > Stephen Frost writes: >> * Tom Lane (t...@sss.pgh.pa.us) wrote: >>> I'm not real sure that you want a dependency for a security label anyway >>> --- wouldn't that mean each label could only be used for one object? > >> Err, your question comes ac

Re: [HACKERS] List traffic

2010-05-27 Thread Tom Lane
Josh Berkus writes: > On 5/27/10 8:38 AM, Greg Stark wrote: >> Mot administration >> questions are originally posed as general help questions. If you're >> subscribed to these lists you get a random, fairly small, subset of >> discussion related these topics. > Only someone who is a postgresql de

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Pavel Stehule
2010/5/27 Tom Lane : > Peter Eisentraut writes: >> On tor, 2010-05-27 at 12:59 -0400, Tom Lane wrote: >>> I'm afraid FOR doesn't work either; it'll create a conflict with the >>> spec-defined SUBSTRING(x FOR y) syntax. > >> How about >> select myfunc(a := 7, b := 6); >> ? > > Hey, that's a thought

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> I'm not real sure that you want a dependency for a security label anyway >> --- wouldn't that mean each label could only be used for one object? > Err, your question comes across to me like "if you added comments to > pg_depend, yo

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Kevin Grittner
Robert Haas wrote: > I proposed an idea at PGCon, but I believe Tom and Heikki thought > it was far too grotty to consider. Well, as an alternative -- don't we have some information about the relation pinned which could hold the xid of its creator? If the tuple is frozen check to see if your

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Peter Eisentraut writes: > > select myfunc(a := 7, b := 6); Kinda like it myself. > Question #1: is the SQL committee likely to standardize that out > from under us, too? Couldn't say on that one. > Question #2: will ecpg have a problem with this? Or p

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > I agree that we need to address this. I am kind of curious how this is > > handled for comments? It appears to be, but I don't see an entry in > > pg_depend when a comment is added to an object, yet the entry in > > pg_descriptio

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Tom Lane
Robert Haas writes: > On Thu, May 27, 2010 at 3:50 PM, Tom Lane wrote: >> It certainly is --- he was actually declaring a cast with it in his >> example, no? > That was an attempt at a workaround to get it to do what he wanted. Oh. If you don't want to think of it as being a cast-like operatio

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 3:52 PM, Kevin Grittner wrote: > Robert Haas wrote: >> On Thu, May 27, 2010 at 3:15 PM, Kevin Grittner > >>> (a)  The tuples were written within the same transaction which >>> created or truncated the table. > >> In case (a), you mess up visibility with respect to other >>

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Tom Lane
Peter Eisentraut writes: > On tor, 2010-05-27 at 12:59 -0400, Tom Lane wrote: >> I'm afraid FOR doesn't work either; it'll create a conflict with the >> spec-defined SUBSTRING(x FOR y) syntax. > How about > select myfunc(a := 7, b := 6); > ? Hey, that's a thought. We couldn't have used that not

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 3:50 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, May 27, 2010 at 3:35 PM, Tom Lane wrote: >>> If the function is a cast function (which it is), > >> I don't think it is. > > It certainly is --- he was actually declaring a cast with it in his > example, no? That

Re: [HACKERS] Synchronization levels in SR

2010-05-27 Thread Bruce Momjian
Simon Riggs wrote: > On Wed, 2010-05-26 at 18:52 +0900, Fujii Masao wrote: > > > I guess that dropping the support of #3 doesn't reduce complexity > > since the code of #3 is almost the same as that of #2. Like > > walreceiver sends the ACK after receiving the WAL in #2 case, it has > > only to do

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Kevin Grittner
Robert Haas wrote: > On Thu, May 27, 2010 at 3:15 PM, Kevin Grittner >> (a) The tuples were written within the same transaction which >> created or truncated the table. > In case (a), you mess up visibility with respect to other > command-IDs within the transaction. Surely that problem is s

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Tom Lane
Robert Haas writes: > On Thu, May 27, 2010 at 3:35 PM, Tom Lane wrote: >> If the function is a cast function (which it is), > I don't think it is. It certainly is --- he was actually declaring a cast with it in his example, no? regards, tom lane -- Sent via pgsql-hack

Re: [HACKERS] [9.1] pg_stat_get_backend_server_addr

2010-05-27 Thread Tom Lane
Peter Eisentraut writes: > There are functions pg_stat_get_backend_client_addr and > pg_stat_get_backend_client_port, which are exposed through the > pg_stat_activity view, but there is no straightforward way to get the > server-side address and port of a connection. This is obviously much > less

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 3:15 PM, Kevin Grittner wrote: > Jesper Krogh wrote: > >> Couldn't pages that are totally filled by the same transaction, be > >> frozen on the initial write? > > As far as I'm aware, that can only be done if: > > (a)  The tuples were written within the same transaction wh

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Tom Lane
Stephen Frost writes: >> We also add a dependency between the labeled object and the security >> label itself. It also enables to clean up orphan labels automatically, >> without any new invention. > I agree that we need to address this. I am kind of curious how this is > handled for comments?

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Peter Eisentraut
On tor, 2010-05-27 at 12:59 -0400, Tom Lane wrote: > > I think we should fix it now. Quick thought: maybe we could use > FOR > > instead of AS: select myfunc(7 for a, 6 for b); > > I'm afraid FOR doesn't work either; it'll create a conflict with the > spec-defined SUBSTRING(x FOR y) syntax. How

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 3:35 PM, Tom Lane wrote: > If the function is a cast function (which it is), I don't think it is. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Tom Lane
Joseph Adams writes: > I tried making a function named json_type that has the same name as > the type json_type. However, this doesn't work as expected: > SELECT json_type('[1,2,3]'); > Instead of calling json_type with '[1,2,3]' casted to JSON, it's > trying to cast '[1,2,3]' to json_type. Is

[HACKERS] [9.1] pg_stat_get_backend_server_addr

2010-05-27 Thread Peter Eisentraut
There are functions pg_stat_get_backend_client_addr and pg_stat_get_backend_client_port, which are exposed through the pg_stat_activity view, but there is no straightforward way to get the server-side address and port of a connection. This is obviously much less commonly needed than the client inf

Re: [HACKERS] Specification for Trusted PLs?

2010-05-27 Thread David Fetter
On Thu, May 27, 2010 at 11:23:44AM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Joshua Tolley writes: > > > Agreed. As long as a trusted language can do things outside the > > > database only by going through a database and calling some > > > function to which the user has rights, in an untru

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Kevin Grittner
Jesper Krogh wrote: > Couldn't pages that are totally filled by the same transaction, be > frozen on the initial write? As far as I'm aware, that can only be done if: (a) The tuples were written within the same transaction which created or truncated the table. *or* (b) The writing tr

Re: [HACKERS] [RFC] Security label support

2010-05-27 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: > As we talked at the developer meeting on Ottawa, it needs to provide > a capability to assign a short text identifier on database objects > to support label based ESP (such as SELinux). > So, I'd like to propose a few approaches to support sec

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Jesper Krogh
On 27/05/2010, at 20.00, Josh Berkus wrote: Well, maybe I'm confused here, but arranging things so that we NEVER have to visit the page after initially writing it seems like it's setting the bar almost impossibly high. That is the use case, though. What I've encountered so far at 3 clie

Re: [HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 1:58 PM, Mohammad Heykal Abdillah wrote: > Now to the question, why my manualy constructed list was failed to > execute? I was pretty sure that my list node was identical with yacc. Because you have a bug in your code. -- Robert Haas EnterpriseDB: http://www.enterprisedb

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 2:59 PM, David E. Wheeler wrote: > On May 27, 2010, at 11:55 AM, Robert Haas wrote: >> Or we could use the Finnish word >> epäjärjestelmällistyttämättömyydellänsäkäänköhän, which I'm pretty >> sure is not currently used in our grammar. > > I thought that was an Icelandic vo

Re: [HACKERS] pg_trgm

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 2:01 PM, Peter Eisentraut wrote: > On fre, 2010-05-28 at 00:46 +0900, Tatsuo Ishii wrote: >> > I don't know about Japanese, but the locale approach works just fine for >> > other agglutinative languages.  I would rather suspect that it is the >> > trigram approach that migh

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread David E. Wheeler
On May 27, 2010, at 11:55 AM, Robert Haas wrote: > Or we could use the Finnish word > epäjärjestelmällistyttämättömyydellänsäkäänköhän, which I'm pretty > sure is not currently used in our grammar. I thought that was an Icelandic volcano. Best, David -- Sent via pgsql-hackers mailing list (p

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 1:27 PM, David E. Wheeler wrote: > On May 27, 2010, at 9:59 AM, Tom Lane wrote: > >>> I think we should fix it now.  Quick thought: maybe we could use FOR >>> instead of AS: select myfunc(7 for a, 6 for b); >> >> I'm afraid FOR doesn't work either; it'll create a conflict w

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 2:00 PM, Josh Berkus wrote: >> Well, maybe I'm confused here, but arranging things so that we NEVER >> have to visit the page after initially writing it seems like it's >> setting the bar almost impossibly high. > > That is the use case, though.  What I've encountered so fa

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 2:17 PM, Josh Berkus wrote: > On 5/26/10 6:32 PM, Robert Haas wrote: >> Hmm, yeah.  Maybe we should freeze when we set PD_ALL_VISIBLE; that >> might be just as good, and simpler.  Assuming the visibility map is >> sufficiently crash-safe/non-buggy, we could then teach VACUU

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 2:39 PM, Joseph Adams wrote: > I've started implementing the JSON datatype; the repo is at > http://git.postgresql.org/gitweb?p=json-datatype.git . > > On Fri, May 14, 2010 at 1:15 PM, Robert Haas wrote: >> On Thu, May 13, 2010 at 9:47 PM, Joseph Adams >> wrote: >>> Would

Re: [HACKERS] JSON manipulation functions

2010-05-27 Thread Joseph Adams
I've started implementing the JSON datatype; the repo is at http://git.postgresql.org/gitweb?p=json-datatype.git . On Fri, May 14, 2010 at 1:15 PM, Robert Haas wrote: > On Thu, May 13, 2010 at 9:47 PM, Joseph Adams > wrote: >> Would it be a bad idea to give an enum and a function the same name >

Re: [HACKERS] [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
Ray Stell writes: > On Thu, May 27, 2010 at 12:49:49PM -0400, Tom Lane wrote: >> That is in the right place, isn't it. That would suggest that >> get_ps_display() is returning a wrong length on Ray's machine. >> It works okay here, but since that's platform-specific code that >> hardly proves muc

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Josh Berkus
On 5/26/10 6:32 PM, Robert Haas wrote: > Hmm, yeah. Maybe we should freeze when we set PD_ALL_VISIBLE; that > might be just as good, and simpler. Assuming the visibility map is > sufficiently crash-safe/non-buggy, we could then teach VACUUM that > it's OK to advance relfrozenxid even when doing j

Re: [HACKERS] 9.0beta2 release plans

2010-05-27 Thread Simon Riggs
On Thu, 2010-05-27 at 11:24 -0400, Tom Lane wrote: > Current thought among core is to wrap beta2 Thursday June 3 (a week > from today) for public release on Monday the 7th. Get those fixes in. I believe my issues are all sorted, apart from one outstanding patch to attempt to address the max_stan

Re: [HACKERS] List traffic

2010-05-27 Thread Josh Berkus
On 5/27/10 8:38 AM, Greg Stark wrote: > Lists like -ecpg or -odbc > would work fine if the traffic warranted them. A low-traffic list is a feature, not a bug. Most people don't *like* subscribing to lists which have 80posts/day. > But some of the lists we have now are 99% overlap with each other

Re: [HACKERS] pg_trgm

2010-05-27 Thread Peter Eisentraut
On fre, 2010-05-28 at 00:46 +0900, Tatsuo Ishii wrote: > > I don't know about Japanese, but the locale approach works just fine for > > other agglutinative languages. I would rather suspect that it is the > > trigram approach that might be rather useless for such languages, > > because you are goi

Re: [HACKERS] Idea for getting rid of VACUUM FREEZE on cold pages

2010-05-27 Thread Josh Berkus
> Well, maybe I'm confused here, but arranging things so that we NEVER > have to visit the page after initially writing it seems like it's > setting the bar almost impossibly high. That is the use case, though. What I've encountered so far at 3 client sites is tables which are largely append-on

[HACKERS] Why my manualy constructed raw parser tree produce failed to execute?

2010-05-27 Thread Mohammad Heykal Abdillah
Hi all, I have try to understand how parser work. So far the raw parser in PostgreSQL will produce that called "raw parser tree" and the "raw parser tree" will be passed to "analyzer", right? I have modified PostgreSQL, so the program wont call function "raw_parser" -a function container that mak

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread David E. Wheeler
On May 27, 2010, at 9:59 AM, Tom Lane wrote: >> I think we should fix it now. Quick thought: maybe we could use FOR >> instead of AS: select myfunc(7 for a, 6 for b); > > I'm afraid FOR doesn't work either; it'll create a conflict with the > spec-defined SUBSTRING(x FOR y) syntax. How about "I

Re: [HACKERS] Keepalive for max_standby_delay

2010-05-27 Thread Simon Riggs
On Wed, 2010-05-26 at 16:22 -0700, Josh Berkus wrote: > > Just this second posted about that, as it turns out. > > > > I have a v3 *almost* ready of the keepalive patch. It still makes sense > > to me after a few days reflection, so is worth discussion and review. In > > or out, I want this settle

Re: [HACKERS] [ADMIN] command tag logging

2010-05-27 Thread Ray Stell
On Thu, May 27, 2010 at 12:49:49PM -0400, Tom Lane wrote: > alvherre writes: > > Excerpts from Ray Stell's message of mi?? may 26 17:08:33 -0400 2010: > >> I just installed a compiled from src 8.3.11. I usually include %i, > >> command tag, > >> in the log_line_prefix setting. This causes some

Re: [HACKERS] [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre writes: > Excerpts from Tom Lane's message of jue may 27 12:49:49 -0400 2010: >> That is in the right place, isn't it. That would suggest that >> get_ps_display() is returning a wrong length on Ray's machine. >> It works okay here, but since that's platform-specific code that >> hardly p

Re: [HACKERS] functional call named notation clashes with SQL feature

2010-05-27 Thread Tom Lane
Andrew Dunstan writes: > Peter Eisentraut wrote: >> In systems that have inheritance of composite types, this is used to >> specify which type the value is supposed to be interpreted as (for >> example, to treat the value as a supertype). Why don't they just use CAST() syntax for that, instead of

Re: [HACKERS] Exposing the Xact commit order to the user

2010-05-27 Thread Jan Wieck
On 5/27/2010 9:59 AM, Greg Stark wrote: On Wed, May 26, 2010 at 5:38 PM, Greg Stark wrote: How about just API generalities? Like, where do you need this data, on the master or on the slave? Would PGXC like it on the transaction coordinator? What question do you need to answer, do you need to p

Re: [HACKERS] [ADMIN] command tag logging

2010-05-27 Thread alvherre
Excerpts from Tom Lane's message of jue may 27 12:49:49 -0400 2010: > alvherre writes: > > Excerpts from Ray Stell's message of mié may 26 17:08:33 -0400 2010: > >> I just installed a compiled from src 8.3.11. I usually include %i, > >> command tag, > >> in the log_line_prefix setting. This cau

Re: [HACKERS] [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre writes: > Excerpts from Ray Stell's message of mié may 26 17:08:33 -0400 2010: >> I just installed a compiled from src 8.3.11. I usually include %i, command >> tag, >> in the log_line_prefix setting. This causes some spewage I'd not seen before >> on connection received lines as if it

Re: [HACKERS] Straightforward Synchronous Replication

2010-05-27 Thread Robert Haas
On Thu, May 27, 2010 at 11:50 AM, Simon Riggs wrote: > On Thu, 2010-05-27 at 10:11 -0400, Robert Haas wrote: >> On Thu, May 27, 2010 at 9:08 AM, Simon Riggs wrote: >> > * New process: WALAck (on standby) >> > Reads shared memory to get last received and last applied xlog location >> > and sends m

Re: [HACKERS] List traffic

2010-05-27 Thread Marc G. Fournier
On Thu, 27 May 2010, Greg Stark wrote: Sure, if we have distinctions which make sense then having separate lists makes sense. Linux has separate lists for different drivers, different parts of the kernel, projects to improve the kernel in various specific ways (latency, etc). I'm all for having

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> So I think a GUC is broken because pg_tgrm has a index opclasses and > any indexes built using one setting will be broken if the GUC is > changed. > > Perhaps we need two sets of functions (which presumably call the same > implementation with a flag to indicate which definition to use). Then > y

Re: [HACKERS] Straightforward Synchronous Replication

2010-05-27 Thread Simon Riggs
On Thu, 2010-05-27 at 10:11 -0400, Robert Haas wrote: > On Thu, May 27, 2010 at 9:08 AM, Simon Riggs wrote: > > * New process: WALAck (on standby) > > Reads shared memory to get last received and last applied xlog location > > and sends message to WALSync on primary. Loop/Sleep forever. > > So wo

Re: [HACKERS] pg_trgm

2010-05-27 Thread Tatsuo Ishii
> I don't know about Japanese, but the locale approach works just fine for > other agglutinative languages. I would rather suspect that it is the > trigram approach that might be rather useless for such languages, > because you are going to get a lot of similarity hits for the affixes. I'm not su

  1   2   >