Re: [HACKERS] Regex code versus Unicode chars beyond codepoint 255

2012-02-17 Thread David Smith
on 2010-11-24 at 15:56, Tom Lane wrote: Bug #5766 points out that we're still not there yet in terms of having sane behavior for locale-specific regex operations in Unicode encoding. The reason it's not working is that regc_locale does this to expand the set of characters that are considered

Re: [HACKERS] Bug in intarray?

2012-02-17 Thread Guillaume Lelarge
On Thu, 2012-02-16 at 19:27 -0500, Tom Lane wrote: Guillaume Lelarge guilla...@lelarge.info writes: This query: SELECT ARRAY[-1,3,1] ARRAY[1, 2]; should give {1} as a result. But, on HEAD (and according to his tests, on 9.0.6 and 9.1.2), it appears to give en empty array.

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Heikki Linnakangas
On 16.02.2012 01:06, Tom Lane wrote: In bug #6457 it's pointed out that we *still* don't have full functionality for locale-dependent regexp behavior with UTF8 encoding. The reason is that there's old crufty code in regc_locale.c that only considers character codes up to 255 when searching for

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Wait, we already have ALTER TRIGGER bob ON ANY COMMAND SET DISABLED; Eh, so what happens then if someone sets a command trigger on ALTER TRIGGER? We should remove support for command triggers on alter command triggers. Well I could also go with the GUC

Re: Scaling XLog insertion (was Re: [HACKERS] Moving more work outside WALInsertLock)

2012-02-17 Thread Heikki Linnakangas
On 16.02.2012 13:31, Fujii Masao wrote: On Thu, Feb 16, 2012 at 6:15 PM, Fujii Masaomasao.fu...@gmail.com wrote: BTW, when I ran the test on my Ubuntu, I could not reproduce the problem. I could reproduce the problem only in MacOS. + nextslot = Insert-nextslot; + if

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread premanand
Hi, Thanks for the reply. It is not possible to change the query in our environment. So we need to do casting. I'm a new bee, so it will be more helpful if you give me some simple examples. -- View this message in context:

Re: [HACKERS] Displaying accumulated autovacuum cost

2012-02-17 Thread Fujii Masao
On Sat, Nov 26, 2011 at 10:10 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Nov 25, 2011 at 11:39 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: I'm going to push this now anyway, thanks. This patch adds a count of the number of buffers dirtied to VACUUM, but it strikes me that

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-17 Thread Albe Laurenz
Shigeru Hanada wrote: - Since a rescan is done by rewinding the cursor, is it necessary to have any other remote isolation level than READ COMMITED? There is only one query issued per transaction. If multiple foreign tables on a foreign server is used in a local query, multiple

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 04:22 AM, premanand wrote: Hi, Thanks for the reply. It is not possible to change the query in our environment. So we need to do casting. I'm a new bee, so it will be more helpful if you give me some simple examples. That's not what this list is for, You should be asking in

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: ... after looking at it more closely, I think only this line needs to be in a separate file: typedef struct CommandContextData *CommandContext; Files like src/backend/commands/tablecmds.c and others need both the structure and the pointer, so

[HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
Hi, This may have already been discussed before, but I can't find any mention of it. Would it be desirable to add support for triggers that contain their own anonymous functions (i.e. DO)? So instead of CREATE TRIGGER... EXECUTE PROCEDURE functioname(); you'd have: CREATE TRIGGER... DO $$

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: I didn't like the new cmdtrigger.h file. It's included by a lot of other headers, and it's also itself including execnodes.h and It turns around that this file does not need including execnode.h, I've cleaned that up now (compile ok, make

Re: [HACKERS] Command Triggers

2012-02-17 Thread Marko Kreen
On Fri, Feb 17, 2012 at 10:54 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Wait, we already have ALTER TRIGGER bob ON ANY COMMAND SET DISABLED; Eh, so what happens then if someone sets a command trigger on ALTER TRIGGER? We should remove

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Marko Kreen mark...@gmail.com writes: Btw, we already have a GUC for triggers: session_replication_role, how will the command triggers follow that? Note that the replica here in my mind would have been an Hot Standby node, and having the standby run the replica/always command triggers is not

Re: [HACKERS] Command Triggers

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 3:54 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Wait, we already have ALTER TRIGGER bob ON ANY COMMAND SET DISABLED; Eh, so what happens then if someone sets a command trigger on ALTER TRIGGER? We should remove support

Re: [HACKERS] Command Triggers

2012-02-17 Thread Marko Kreen
On Fri, Feb 17, 2012 at 4:04 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Marko Kreen mark...@gmail.com writes: Btw, we already have a GUC for triggers: session_replication_role, how will the command triggers follow that? Note that the replica here in my mind would have been an Hot

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Here's a wild idea: keep the class of each codepoint in a hash table. Initialize it with all codepoints up to 0x. After that, whenever a string contains a character that's not in the hash table yet, query the class of that

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 09:39 AM, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: Here's a wild idea: keep the class of each codepoint in a hash table. Initialize it with all codepoints up to 0x. After that, whenever a string contains a character that's not in the

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 3:48 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Here's a wild idea: keep the class of each codepoint in a hash table. Initialize it with all codepoints up to 0x. After that, whenever a string contains a character that's not in the hash table

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 2:45 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Of course, the best fix would be to change your queries. It's quite sloppy to rely on integer LIKE text without an explicit cast in the query. Why? I understand why it's a bad idea to rely on integer

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Feb 17, 2012 at 3:48 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Recompiling is expensive, but if you cache the results for the session, it would probably be acceptable. What if you did this ONCE and wrote the results to

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I understand why it's a bad idea to rely on integer = text doing anything sane - is that text equality or numeric equality? And in theory the same issue could exist here if there were another meaning for LIKE. But there isn't. Really? LIKE is just

[HACKERS] Copyright notice for contrib/cube?

2012-02-17 Thread Jay Levitt
I'm basing an extension off contrib/cube. I'm going to open-source it under the existing PostgreSQL license, but I'm not sure how the copyright notice should look - there isn't one at the moment. (In fact, there's no LICENSE or COPYRIGHT file at all.) Should it be something like Portions

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread David E. Wheeler
On Feb 17, 2012, at 5:22 AM, Thom Brown wrote: The purpose being to only have a single statement to set up the trigger rather than setting up a separate trigger function which will unlikely be re-used by other triggers... or is this of dubious benefit? +1, though I imagine it would just give

Re: [HACKERS] Copyright notice for contrib/cube?

2012-02-17 Thread Marti Raudsepp
On Fri, Feb 17, 2012 at 17:42, Jay Levitt jay.lev...@gmail.com wrote: Should it be something like Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group Portions Copyright (c) 2012, TipTap Inc. Please don't add that, just change 2011 to 2012. This is what the wiki says: Q: May

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 11:29 AM, David E. Wheeler wrote: On Feb 17, 2012, at 5:22 AM, Thom Brown wrote: The purpose being to only have a single statement to set up the trigger rather than setting up a separate trigger function which will unlikely be re-used by other triggers... or is this of dubious

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
On 17 February 2012 16:29, David E. Wheeler da...@justatheory.com wrote: On Feb 17, 2012, at 5:22 AM, Thom Brown wrote: The purpose being to only have a single statement to set up the trigger rather than setting up a separate trigger function which will unlikely be re-used by other

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
On 17 February 2012 16:43, Andrew Dunstan and...@dunslane.net wrote: On 02/17/2012 11:29 AM, David E. Wheeler wrote: On Feb 17, 2012, at 5:22 AM, Thom Brown wrote: The purpose being to only have a single statement to set up the trigger rather than setting up a separate trigger function

Re: [HACKERS] Copyright notice for contrib/cube?

2012-02-17 Thread Jay Levitt
Marti Raudsepp wrote: On Fri, Feb 17, 2012 at 17:42, Jay Levittjay.lev...@gmail.com wrote: Should it be something like Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group Portions Copyright (c) 2012, TipTap Inc. Please don't add that, just change 2011 to 2012. This is what

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 10:27 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I understand why it's a bad idea to rely on integer = text doing anything sane - is that text equality or numeric equality? And in theory the same issue could exist here if there

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 11:46 AM, Thom Brown wrote: On 17 February 2012 16:43, Andrew Dunstanand...@dunslane.net wrote: On 02/17/2012 11:29 AM, David E. Wheeler wrote: On Feb 17, 2012, at 5:22 AM, Thom Brown wrote: The purpose being to only have a single statement to set up the trigger rather than

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Dimitri Fontaine dimi...@2ndquadrant.fr writes: I think it would be better to bail on trying to use CREATE TRIGGER and DROP TRIGGER as a basis for this functionality, and instead create completely new toplevel statements CREATE COMMAND TRIGGER and DROP COMMAND TRIGGER.  Then, you could decide

Re: [HACKERS] Command Triggers

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 10:42 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Done.  Of course at the time the command trigger is created you can't distinguish if the CREATE INDEX command will be run CONCURRENTLY or not, so I've decided to issue a WARNING about it. That seems icky.

Re: [HACKERS] Copyright notice for contrib/cube?

2012-02-17 Thread Tom Lane
Jay Levitt jay.lev...@gmail.com writes: Marti Raudsepp wrote: Please don't add that, just change 2011 to 2012. This is what the wiki says: Q: May I add my own copyright notice where appropriate? To clarify, this is for an extension to be distributed separately on PGXN and GitHub, not for a

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 10:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: What if you did this ONCE and wrote the results to a file someplace? That's still a cache, you've just defaulted on your obligation to think about what conditions require the cache to be flushed. Yep. Unfortunately, I don't

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I remember there was a time when you couldn't say SELECT a x FROM foo in PostgreSQL. We told people that it was because our syntax was more flexible - we have postfix operators, or something. Which it was, and yes that was the reason. We eventually

Re: [HACKERS] Displaying accumulated autovacuum cost

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 5:04 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are review comments: The document about EXPLAIN needs to be updated. You forgot to add the long-integer-valued property of shared/local_blks_dirtied. So when I ran EXPLAIN and used json as a format, no

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Peter Eisentraut
On fre, 2012-02-17 at 13:22 +, Thom Brown wrote: So instead of CREATE TRIGGER... EXECUTE PROCEDURE functioname(); you'd have: CREATE TRIGGER... DO $$ ... $$; I had wished for this many times and was about to propose something similar. We might wish to review the SQL standard

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: As far as I know, the fact that LIKE is another spelling for ~~ is a PostgreSQL implementation detail with which users ought not to be burdened. +1 LIKE is well defined by the standard, and the ~~ operator is not mentioned there anywhere. On the

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Pavel Stehule
2012/2/17 Kevin Grittner kevin.gritt...@wicourts.gov: Robert Haas robertmh...@gmail.com wrote: As far as I know, the fact that LIKE is another spelling for ~~ is a PostgreSQL implementation detail with which users ought not to be burdened. +1 LIKE is well defined by the standard, and the

Re: [HACKERS] Command Triggers

2012-02-17 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: On Fri, Feb 17, 2012 at 10:42 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Done.  Of course at the time the command trigger is created you can't distinguish if the CREATE INDEX command will be run CONCURRENTLY or not, so I've decided to issue a

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
On 17 February 2012 17:26, Peter Eisentraut pete...@gmx.net wrote: On fre, 2012-02-17 at 13:22 +, Thom Brown wrote: So instead of CREATE TRIGGER... EXECUTE PROCEDURE functioname(); you'd have: CREATE TRIGGER... DO $$ ... $$; I had wished for this many times and was about to

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 12:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't know whether a similar improvement is possible in this area, but we're certainly not going to get there by labeling the user's expectations as unreasonable.  I don't think they are, and the people who wrote MySQL and

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 12:59 PM, Robert Haas wrote: On Fri, Feb 17, 2012 at 12:14 PM, Tom Lanet...@sss.pgh.pa.us wrote: I don't know whether a similar improvement is possible in this area, but we're certainly not going to get there by labeling the user's expectations as unreasonable. I don't think

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Jeff MacDonald
Greetings, My biggest concern is whether we might paint ourselves into a corner by including such an extension. It might shut off avenues for other cool features because anyone using the extension would have conflicts. Perhaps such a thing would be more appropriate on PGXN with

Re: [HACKERS] Designing an extension for feature-space similarity search

2012-02-17 Thread Jay Levitt
Tom Lane wrote: Jay Levittjay.lev...@gmail.com writes: - Does KNN-GiST run into problems when- returns values that don't make sense in the physical world? If the indexed entities are records, it would be entirely your own business how you handled individual fields being NULL. This turns

Re: [HACKERS] Simulating Clog Contention

2012-02-17 Thread Robert Haas
On Mon, Jan 30, 2012 at 12:26 PM, Robert Haas robertmh...@gmail.com wrote: I was thinking the opposite.  That -i should only print progress indication when -d is given.  Or at least knock an order of magnitude or two off of how often it does so. I'd be in all in favor of having -i emit

Re: [HACKERS] Designing an extension for feature-space similarity search

2012-02-17 Thread Alexander Korotkov
On Fri, Feb 17, 2012 at 11:00 PM, Jay Levitt jay.lev...@gmail.com wrote: Tom Lane wrote: Jay Levittjay.lev...@gmail.com writes: - Does KNN-GiST run into problems when- returns values that don't make sense in the physical world? If the indexed entities are records, it would be

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Christopher Browne
On Fri, Feb 17, 2012 at 1:21 PM, Andrew Dunstan and...@dunslane.net wrote: Assuming we had the cast, What would intval like '1%' mean? You're going to match 1, 10..19, 100..199, 1000..1999 ... Now maybe there's a good use for such a test, but I'm have a VERY hard time imagining what it might

Re: [HACKERS] Designing an extension for feature-space similarity search

2012-02-17 Thread Jay Levitt
Alexander Korotkov wrote: On Fri, Feb 17, 2012 at 11:00 PM, Jay Levitt jay.lev...@gmail.com mailto:jay.lev...@gmail.com wrote: At first I thought this posed a challenge for union; if I have these points: (1,2) (2,1) (1,NULL) what's the union? I think the answer is to

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Don Baccus
On Feb 17, 2012, at 11:28 AM, Christopher Browne wrote: And I have *zero* confidence that for PostgreSQL to rule out LIKE '1%' is preventing those designs from getting built... When confronted by a difficult problem, solve it by reducing it to the question, How would the Lone Ranger handle

Re: [HACKERS] Designing an extension for feature-space similarity search

2012-02-17 Thread Alexander Korotkov
On Fri, Feb 17, 2012 at 11:32 PM, Jay Levitt jay.lev...@gmail.com wrote: Alexander Korotkov wrote: On Fri, Feb 17, 2012 at 11:00 PM, Jay Levitt jay.lev...@gmail.com mailto:jay.lev...@gmail.com wrote: At first I thought this posed a challenge for union; if I have these points:

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 02:28 PM, Christopher Browne wrote: On Fri, Feb 17, 2012 at 1:21 PM, Andrew Dunstanand...@dunslane.net wrote: Assuming we had the cast, What would intval like '1%' mean? You're going to match 1, 10..19, 100..199, 1000..1999 ... Now maybe there's a good use for such a test, but

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 1:21 PM, Andrew Dunstan and...@dunslane.net wrote: Assuming we had the cast, What would intval like '1%' mean? You're going to match 1, 10..19, 100..199, 1000..1999 ... Yep. Now maybe there's a good use for such a test, but I'm have a VERY hard time imagining what it

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Assuming we had the cast, What would intval like '1%' mean? You're going to match 1, 10..19, 100..199, 1000..1999 ... Now maybe there's a good use for such a test, but I'm have a VERY hard time imagining what it might be. Yeah, that's another

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Robert Haas
On Fri, Feb 17, 2012 at 2:44 PM, Andrew Dunstan and...@dunslane.net wrote: Strings of digits used that way should not be stored in numeric fields at all, IMNSHO, just as zip codes and phone numbers should not be. They should be text in the first place, and if the OP had done that he wouldn't

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 02:52 PM, Robert Haas wrote: If we really believed that implicit casts any form were evil, we would have removed them entirely instead of trimming them back. I don't see why it's heretical to suggest that the 8.3 casting changes brought us to exactly that point in the universe

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: And thinking about it, DO is a bit nonsense here, so maybe we'd just have something like: CREATE TRIGGER... AS $$ BEGIN END; $$; i.e. the same as a function. I like that. How do you tell which language the trigger is written in? I'm not so sure about

Re: [HACKERS] Designing an extension for feature-space similarity search

2012-02-17 Thread Jay Levitt
Alexander Korotkov wrote: On Fri, Feb 17, 2012 at 11:32 PM, Jay Levitt jay.lev...@gmail.com Ah, yes, exactly the same problem. So what led you to add a flag instead of using the range NULL..NULL? I'm on the fence about choosing. At first, range bounds can't be NULL :) At second, if

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
On 17 February 2012 20:40, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: And thinking about it, DO is a bit nonsense here, so maybe we'd just have something like: CREATE TRIGGER... AS $$ BEGIN END; $$; i.e. the same as a function. I like that.  How

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Andrew Dunstan
On 02/17/2012 03:58 PM, Thom Brown wrote: On 17 February 2012 20:40, Dimitri Fontainedimi...@2ndquadrant.fr wrote: Thom Brownt...@linux.com writes: And thinking about it, DO is a bit nonsense here, so maybe we'd just have something like: CREATE TRIGGER... AS $$ BEGIN END; $$; i.e. the

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Thom Brown
On 17 February 2012 21:07, Andrew Dunstan and...@dunslane.net wrote: On 02/17/2012 03:58 PM, Thom Brown wrote: On 17 February 2012 20:40, Dimitri Fontainedimi...@2ndquadrant.fr  wrote: Thom Brownt...@linux.com  writes: And thinking about it, DO is a bit nonsense here, so maybe we'd just

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 02/17/2012 03:58 PM, Thom Brown wrote: On 17 February 2012 20:40, Dimitri Fontainedimi...@2ndquadrant.fr wrote: I'm not so sure about other function properties (SET, COST, ROWS, SECURITY DEFINER etc) because applying default and punting users to

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Has anybody stopped to look at the SQL standard for this? In-line trigger definitions are actually what they intend, IIRC. In which language? Do we need to include PL/PSM to be compliant, and use that by default? In that case we might want to force people

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: Has anybody stopped to look at the SQL standard for this? In-line trigger definitions are actually what they intend, IIRC. In which language? Do we need to include PL/PSM to be compliant, and use that by

Re: [HACKERS] 16-bit page checksums for 9.2

2012-02-17 Thread Simon Riggs
On Thu, Feb 16, 2012 at 1:53 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Feb 16, 2012 at 6:16 AM, Simon Riggs si...@2ndquadrant.com wrote: v8 attached It's hard to believe that this version has been tested terribly thoroughly, because it doesn't compile. I'm just back home from a

Re: [HACKERS] Triggers with DO functionality

2012-02-17 Thread Jaime Casanova
On Fri, Feb 17, 2012 at 4:46 PM, Tom Lane t...@sss.pgh.pa.us wrote: Has anybody stopped to look at the SQL standard for this?  In-line trigger definitions are actually what they intend, IIRC. this is what i found there trigger definition ::=   CREATE TRIGGER trigger name trigger action time

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Feb 17, 2012 at 10:19 AM, Tom Lane t...@sss.pgh.pa.us wrote: Before going much further with this, we should probably do some timings of 64K calls of iswupper and friends, just to see how bad a dumb implementation will be. Can't hurt. The

[HACKERS] elog and MemoryContextSwitchTo

2012-02-17 Thread Gaetano Mendola
Hi all, Is the following code well formed? oldContext = MemoryContextSwitchTo(newContext); if (something_bad) { elog(ERROR, ...); } ... MemoryContextSwitchTo(oldContext); or do I have to ripristinate the oldContext before to issue the elog ? Regards Gaetano Mendola -- Sent via

Re: [HACKERS] elog and MemoryContextSwitchTo

2012-02-17 Thread Tom Lane
Gaetano Mendola mend...@gmail.com writes: or do I have to ripristinate the oldContext before to issue the elog ? No. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Josh Berkus
On 2/17/12 12:04 PM, Robert Haas wrote: The argument isn't about whether the user made the right design choices; it's about whether he should be forced to insert an explicit type cast to get the query to do what it is unambiguously intended to do. I don't find INTEGER LIKE '1%' to be

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-02-17 Thread Don Baccus
On Feb 17, 2012, at 4:12 PM, Josh Berkus wrote: On 2/17/12 12:04 PM, Robert Haas wrote: The argument isn't about whether the user made the right design choices; it's about whether he should be forced to insert an explicit type cast to get the query to do what it is unambiguously intended to

Re: [HACKERS] Notes about fixing regexes and UTF-8 (yet again)

2012-02-17 Thread Tom Lane
I wrote: The answer, on a reasonably new desktop machine (2.0GHz Xeon E5503) running Fedora 16 in en_US.utf8 locale, is that 64K iterations of pg_wc_isalpha or sibling functions requires a shade under 2ms. So this definitely justifies caching the values to avoid computing them more than once