Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Josh Berkus
> (FWIW, my recollection of the original design intention for > pg_controldata was that it was meant as a troubleshooting tool if the > database wouldn't start up. I'm somewhat bemused to hear that people > are trying to use it as part of production scripts. It wasn't meant to > produce machine-

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Kevin Flanagan
Ok, that got me on the right track, thanks. I think the key points for this build scenario are these: 1. you have to define the symbol BUILDING_DLL in your code before including postgres.h (as that then means PGDLLIMPORT gets defined right in pg_config_os.h). That makes the 'inconsistent dll li

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Tom Lane
Heikki Linnakangas writes: > Greg Smith wrote: >> 1) How do you handle the situation where the pg_controldata is invalid? > If the data in pg_control are invalid, the database won't start up, so > by the time you're running the user-defined-functions the data really > ought be valid. Yeah. If

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread François Pérou
Le vendredi 05 mars 2010 à 15:40 -0500, Robert Haas a écrit : > having > said that, asking us to make changes that are not based on solid > technical arguments, don't conform to the SQL standard, and most > important that we already clearly said we were not going to make is > not the way to get the

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Chris Browne
francois.pe...@free.fr (François Pérou) writes: > * I am very surprised by the SQL level of Php developers. The example > Drupal developers trying to rewrite SQL queries dynamically adding > DISTINCT clause is just an example. So don't expect them to understand > the difference between MySQL and Po

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Robert Haas
On Fri, Mar 5, 2010 at 3:30 PM, Dave Page wrote: > On Fri, Mar 5, 2010 at 6:25 PM, Robert Haas wrote: >> On Fri, Mar 5, 2010 at 9:55 AM, Dave Page wrote: >>> 2010/3/5 François Pérou : Dear friends, As a reminder, I took part in the development of pgAdmin and I am not looking

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 6:25 PM, Robert Haas wrote: > On Fri, Mar 5, 2010 at 9:55 AM, Dave Page wrote: >> 2010/3/5 François Pérou : >>> Dear friends, >>> >>> As a reminder, I took part in the development of pgAdmin and I am not >>> looking for a flame war. >> >> What did you work on François? I ca

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread David Fetter
On Fri, Mar 05, 2010 at 03:10:59PM -0500, Andrew Dunstan wrote: > > > David Fetter wrote: > >On Fri, Mar 05, 2010 at 02:56:23PM +0100, François Pérou wrote: > >>Dear friends, > >> > >>As a reminder, I took part in the development of pgAdmin and I am > >>not looking for a flame war. > > > >You're

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Joshua D. Drake
On Fri, 2010-03-05 at 15:10 -0500, Andrew Dunstan wrote: > > David Fetter wrote: > > On Fri, Mar 05, 2010 at 02:56:23PM +0100, François Pérou wrote: > > > >> Dear friends, > >> > >> As a reminder, I took part in the development of pgAdmin and I am > >> not looking for a flame war. > >> > >

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Andrew Dunstan
David Fetter wrote: On Fri, Mar 05, 2010 at 02:56:23PM +0100, François Pérou wrote: Dear friends, As a reminder, I took part in the development of pgAdmin and I am not looking for a flame war. You're doing a poor job on that latter. You asked before for the PostgreSQL project to "a

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread David Fetter
On Fri, Mar 05, 2010 at 02:56:23PM +0100, François Pérou wrote: > Dear friends, > > As a reminder, I took part in the development of pgAdmin and I am > not looking for a flame war. You're doing a poor job on that latter. You asked before for the PostgreSQL project to "address" the concerns of so

Re: [HACKERS] arithmetic about inet

2010-03-05 Thread Robert Haas
On Thu, Mar 4, 2010 at 4:36 AM, fanng yuan wrote: > Hi Guys: > I just do some research on ip address storage and comparing. I found pgsql > already fixed that issue. I want to get some point from your guys about how > this work. Could you give me some data about that . Also I'm interesting in > pg

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Josh Berkus
> I didn't get that initially from how you characterized this as "past > time" to add. It's at > http://wiki.postgresql.org/wiki/Todo#Point-In-Time_Recovery_.28PITR.29 now. Sorry for not being clear. I took it for granted that since it's past 2/15, no non-critical patches would be even consider

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Greg Smith
Josh Berkus wrote: Oh, I wasn't proposing doing *anything* for 9.0. I wanted to get something on the TODO list for 9.1. As far as I'm concerned, 9.0 is closed to new ideas. We have enough bugs to fix as it is. I didn't get that initially from how you characterized this as "past time" to

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Robert Haas
On Fri, Mar 5, 2010 at 1:48 PM, Josh Berkus wrote: > Given that Francois seems to return to this list every 3 months with the > exact same set of requests, I think we need to make a habit of ignoring > him the way we used to ignore Al Dev (although I'll comment that Al Dev > was *much* more entert

[HACKERS] arithmetic about inet

2010-03-05 Thread fanng yuan
Hi Guys: I just do some research on ip address storage and comparing. I found pgsql already fixed that issue. I want to get some point from your guys about how this work. Could you give me some data about that . Also I'm interesting in pgsql . Could you give me some suggestion about how to hack pgs

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Josh Berkus
All, Given that Francois seems to return to this list every 3 months with the exact same set of requests, I think we need to make a habit of ignoring him the way we used to ignore Al Dev (although I'll comment that Al Dev was *much* more entertaining). Several members of our community are working

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Josh Berkus
On 3/5/10 10:28 AM, Greg Smith wrote: > > I would rather have the ability to tweak on this for a few months to get > everything right, while being able to expose regular updates outside of > core, than to commit "this is the best we've got so far" just under the > wire for 9.0 without necessarily

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Greg Smith
Heikki Linnakangas wrote: Then again, if you don't use the copy in shared memory but just open the pg_control file and read it in the UDF, you could implement this as a pgfoundry module that works with older versions too. This is the direction I'd prefer to see this go in a 9.0 context. It'

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Robert Haas
On Fri, Mar 5, 2010 at 9:55 AM, Dave Page wrote: > 2010/3/5 François Pérou : >> Dear friends, >> >> As a reminder, I took part in the development of pgAdmin and I am not >> looking for a flame war. > > What did you work on François? I can't find your name in my email > archives or on archives.post

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Joshua D. Drake
On Fri, 2010-03-05 at 12:42 -0500, Robert Haas wrote: > 2010/3/5 François Pérou : > > * I am very surprised by the SQL level of Php developers. The example > > Drupal developers trying to rewrite SQL queries dynamically adding > > DISTINCT clause is just an example. So don't expect them to understa

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Jaime Casanova
2010/3/5 François Pérou : > > I believe that PostgreSQL should support more MySQLisms in order to BEAT > MySQL. > we BEAT mysql long ago... to make postgres as broken as mysql is not an improve... > Feel free to use my guide on Drupal website. We have to adapt tools to > people, not the converse.

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Alastair Turner
2010/3/5 François Pérou : > Thanks for your answers. > > To speak frankly: > > * I wrote the Drupal guide for porting from MySQL to PostgreSQL. > > * I am also the author of remarks about people should use PostgreSQL to > write portable SQL. > > * I am very surprised by the SQL level of Php develop

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Andrew Dunstan
François Pérou wrote: I believe that PostgreSQL should support more MySQLisms in order to BEAT MySQL. Our aim is not to beat MySQL. At least mine is not, and I don't think I'm alone. Many of the MySQLisms you want supported are just broken behaviour, in the view of many people. So you

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Robert Haas
2010/3/5 François Pérou : > * I am very surprised by the SQL level of Php developers. The example > Drupal developers trying to rewrite SQL queries dynamically adding > DISTINCT clause is just an example. So don't expect them to understand > the difference between MySQL and PostgreSQL. It is out of

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread François Pérou
Thanks for your answers. To speak frankly: * I wrote the Drupal guide for porting from MySQL to PostgreSQL. * I am also the author of remarks about people should use PostgreSQL to write portable SQL. * I am very surprised by the SQL level of Php developers. The example Drupal developers tryin

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Robert Haas
2010/3/5 François Pérou : > Dear friends, > > As a reminder, I took part in the development of pgAdmin and I am not > looking for a flame war. > > I would like to point out Drupal community efforts (including myself) to > write down the most frequent problems when porting MySQL from/to > PostgreSQL

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Merlin Moncure
2010/3/5 François Pérou : > => All non-aggregate fields must be present in the GROUP BY clause > http://drupal.org/node/30 My take is that this is never going to happen unless we are strictly talking about cases where the non-aggregate fields can be unambiguously determined. If we aren't, mys

[HACKERS] Core dump running PL/Perl installcheck with bleadperl [PATCH]

2010-03-05 Thread Tim Bunce
I encountered a core dump running PL/Perl installcheck with a very recent git HEAD of PostgreSQL and a not quite so recent git HEAD of perl. The cause is a subtle difference between SvTYPE(sv) == SVt_RV and SvROK(sv). The former is checking a low-level implementation detail while the later is dire

Re: [HACKERS] Explicit psqlrc

2010-03-05 Thread Magnus Hagander
2010/3/5 Tom Lane : > Magnus Hagander writes: >> 2010/3/5 David Christensen : >>> My bikeshed has a --psqlrc path/to/file, but +1 on the idea. > >> Do you have a use-case where --psqlrc would be more useful than an >> environment variable, or is it *only* bike-shedding? ;) > > The env variable sol

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Andrew Dunstan
François Pérou wrote: An important pending issue, which goes on and on for years: => All non-aggregate fields must be present in the GROUP BY clause http://drupal.org/node/30 The trouble is that the bottom of this page looks like nonsense to me. The reason that |SELECT COUNT(n

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Heikki Linnakangas
Greg Smith wrote: > pg_controldata itself just reads the file in directly and dumps the > data. There is a copy of it kept around all the time in shared memory > though (ControlFile in xlog.c), protected by a LWLock. At a high level > you can imagine a new function in xlog.c that acquires that lo

Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread Dave Page
2010/3/5 François Pérou : > Dear friends, > > As a reminder, I took part in the development of pgAdmin and I am not > looking for a flame war. What did you work on François? I can't find your name in my email archives or on archives.postgresql.org. -- Dave Page EnterpriseDB UK: http://www.enter

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I do find it a bit hard to imagine that any program capable of shelling > out to call pg_controldata and doing something with the output would hit > a major hurdle parsing the format that's already there. +1 > 1) How do you handle the situ

[HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

2010-03-05 Thread François Pérou
Dear friends, As a reminder, I took part in the development of pgAdmin and I am not looking for a flame war. I would like to point out Drupal community efforts (including myself) to write down the most frequent problems when porting MySQL from/to PostgreSQL: The main MySQL/PostgreSQL issues can

Re: [HACKERS] Explicit psqlrc

2010-03-05 Thread Tom Lane
Magnus Hagander writes: > 2010/3/5 David Christensen : >> My bikeshed has a --psqlrc path/to/file, but +1 on the idea. > Do you have a use-case where --psqlrc would be more useful than an > environment variable, or is it *only* bike-shedding? ;) The env variable solution seems a bit surprising t

Re: [HACKERS] machine-readable pg_controldata?

2010-03-05 Thread Greg Smith
Magnus Hagander wrote: Huh? It's fixed with, you don't need regexps for that. Just split the string apart. Taking options for single fields might have a better usecase, of course :-) I do find it a bit hard to imagine that any program capable of shelling out to call pg_controldata and doin

Re: [HACKERS] Repetition of warning message while REVOKE

2010-03-05 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > One thought is that the column cases should be phrased more like > no privileges could be revoked for column "foo" of table "bar" > Check the messages associated with DROP cascading for the canonical > phrasing here, but I think that's what it is. Loo

Re: [HACKERS] Explicit psqlrc

2010-03-05 Thread Magnus Hagander
2010/3/5 Magnus Hagander : > 2010/3/5 David Christensen : >> >> On Mar 4, 2010, at 4:00 PM, Magnus Hagander wrote: >> >>> I've now for the second time found myself wanting to specify an >>> explicit psqlrc file instead of just parsing ~/.psqlrc, so attached is >>> a patch that accepts the PSQLRC en

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:50 AM, Craig Ringer wrote: > Dave Page wrote: >> On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer >> wrote: >> >>> Why _not_ distribute gettext headers, though? Sources I can understand >>> for size reasons, but the headers are small and fuss free, and you need >>> the _right

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Kevin Flanagan wrote: > Ok, re "building with the win32 configuration" ... that sounds like just the > thing I should know about. All I've done is downloaded and installed the > 1-click installer for Windows from > http://www.enterprisedb.com/products/pgdownload.do#windows ... so while I'm > su

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Kevin Flanagan
Ok, re "building with the win32 configuration" ... that sounds like just the thing I should know about. All I've done is downloaded and installed the 1-click installer for Windows from http://www.enterprisedb.com/products/pgdownload.do#windows ... so while I'm sure it knows it's running on Win3

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: > On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer > wrote: > >> Why _not_ distribute gettext headers, though? Sources I can understand >> for size reasons, but the headers are small and fuss free, and you need >> the _right_ _versions_ to build against the Pg backend. > > No reason

[HACKERS] Using GIN/Gist to search the "union" of two indexes?

2010-03-05 Thread Jesper Krogh
Hi. How complicated would it be to make postgresql-fts search the "union" of several GIN/Gist indexes. The use-case is that you have two tables: tablea(id serial, tableb_id int, text tsvector); and tableb(id serial, text tsvector); and indices on both tsvectors. The typical query would join the

Re: [HACKERS] Explicit psqlrc

2010-03-05 Thread Magnus Hagander
2010/3/5 David Christensen : > > On Mar 4, 2010, at 4:00 PM, Magnus Hagander wrote: > >> I've now for the second time found myself wanting to specify an >> explicit psqlrc file instead of just parsing ~/.psqlrc, so attached is >> a patch that accepts the PSQLRC environment variable to control which

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:31 AM, Craig Ringer wrote: > Why _not_ distribute gettext headers, though? Sources I can understand > for size reasons, but the headers are small and fuss free, and you need > the _right_ _versions_ to build against the Pg backend. No reason, other than I didn't realise

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: > On Fri, Mar 5, 2010 at 9:05 AM, Craig Ringer > wrote: > >> How do _you_ go about building server extensions for Pg? Where do you >> get the headers for gettext etc? > > Same place I get the binaries - gnuwin32 mostly. > >> I'm increasingly thinking the win32 package _should_

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 9:05 AM, Craig Ringer wrote: > How do _you_ go about building server extensions for Pg? Where do you > get the headers for gettext etc? Same place I get the binaries - gnuwin32 mostly. > I'm increasingly thinking the win32 package _should_ be split into > server binary an

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Craig Ringer
Dave Page wrote: > On Fri, Mar 5, 2010 at 4:02 AM, Craig Ringer > wrote: >> Kevin Flanagan wrote: >> >>> the compiler >>> complained about various missing include files, starting with >>> ‘libintl.h’. Having read the post at >>> http://archives.postgresql.org/pgsql-general/2009-03/msg00332.php I >

Re: [HACKERS] Visual Studio 2005, C-language function - avoiding hacks?

2010-03-05 Thread Dave Page
On Fri, Mar 5, 2010 at 4:02 AM, Craig Ringer wrote: > Kevin Flanagan wrote: > >> the compiler >> complained about various missing include files, starting with >> ‘libintl.h’. Having read the post at >> http://archives.postgresql.org/pgsql-general/2009-03/msg00332.php I >> created an empty libint.h