Re: [GENERAL] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Magnus Hagander
Joshua D. Drake wrote: > Magnus Hagander: VC++ support (thank goodness) I would much appreciate more people testing and commenting on this one, from the version in CVS head. //Magnus ---(end of broadcast)--- TIP 3: Have you checked our extensi

Re: [GENERAL] problem installing NPGSQL and pgOLEDB with .NET

2007-02-23 Thread Magnus Hagander
RPK wrote: > I have PostgreSQL 8.2 installed on Windows XP. I installed NPGSQL driver for > .NET and tried to register it's dll with following command: > > regsvr32 c:\windows\system32\npgsql.dll > > It displays error: "Could not be registered, entry point not found". regsvr32 is not used for .n

Re: [GENERAL] Composite Keys

2007-02-23 Thread Joshua D. Drake
RPK wrote: > First, can a primary key field be only one? I mean can I define a primary > containing two fields. As many as you like :) > > I have a table called "Payments" where there are two fields, "ReceiptNo" and > "PaymentDate". If I take "ReceiptNo" only as a primary key then chances are >

[GENERAL] problem installing NPGSQL and pgOLEDB with .NET

2007-02-23 Thread RPK
I have PostgreSQL 8.2 installed on Windows XP. I installed NPGSQL driver for .NET and tried to register it's dll with following command: regsvr32 c:\windows\system32\npgsql.dll It displays error: "Could not be registered, entry point not found". I copied the NPGSQL driver files in application f

[GENERAL] how to tell if using unnamed paramaterized queries?

2007-02-23 Thread Gene
I'm using version 8.2.3 and noticed that certain queries take a very long time even though I have partial indexes that it should be using. It uses them and performs very quickly if I hard code the constants and do an explain. I noticed this in the changelog and figured it was the problem but want

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread CaT
On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: > In postgres, to stop an empty blank string: > > create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thing? -- "To the extent that we overreact, we prof

[GENERAL] Composite Keys

2007-02-23 Thread RPK
First, can a primary key field be only one? I mean can I define a primary containing two fields. I have a table called "Payments" where there are two fields, "ReceiptNo" and "PaymentDate". If I take "ReceiptNo" only as a primary key then chances are of "primary key violation". Because in some pl

Re: [GENERAL] Installing PGSQL Client

2007-02-23 Thread RPK
Windows XP Richard Huxton wrote: > > RPK wrote: >> I have installed PGSQL on server. How to install PGSQL client to connect >> to >> the PGSQL database server. > > You've installed on what? Windows? Solaris? FreeBSD? RedHat Enterprise?... > > -- >Richard Huxton >Archonet Ltd > > ---

Re: [GENERAL] Triggers inherited?

2007-02-23 Thread Bertram Scharpf
Hi, Am Freitag, 23. Feb 2007, 07:10:06 + schrieb Richard Huxton: > Bertram Scharpf wrote: > >it is very inconvenient for me that triggers aren't inherited: > > Foreign keys too (which are a special type of trigger of course). > > >Is this behaviour to be implemented at any point of time in >

Re: [GENERAL] General Ledger db design

2007-02-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/07 20:35, Martin Winsler wrote: > I hope this isn't too far off topic. I've noticed some > discussion about referential integrity, the use of nulls, and > database design recently here. This is a real world situation > where referential inte

[GENERAL] General Ledger db design

2007-02-23 Thread Martin Winsler
I hope this isn't too far off topic. I've noticed some discussion about referential integrity, the use of nulls, and database design recently here. This is a real world situation where referential integrity needs to be broken in theory, I believe. Does anybody have any experience or knowledge

Re: [GENERAL] [HACKERS] urgent: upgraded to 8.2, getting kernel panics

2007-02-23 Thread CAJ CAJ
On 2/23/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Merlin Moncure" <[EMAIL PROTECTED]> writes: > On friday we upgraded a critical backend server to postgresql 8.2 > running on fedora core 4. Umm ... why that particular choice of OS? Red Hat dropped update support for FC4 some time ago, and AFAIK

Re: [GENERAL] Ruby on Rails for PostgreSQL

2007-02-23 Thread Andrej Ricnik-Bay
On 2/24/07, Dave Page <[EMAIL PROTECTED]> wrote: pgRails is a distribution of Ruby, Rails, and the Ruby PostgreSQL connector all preconfigured for use with PostgreSQL on Windows 2000 and above. How easy would that be to integrate on Linux? Cheers, Andrej ---(end of br

Re: [GENERAL] [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > >> Greg Stark: WITH/Recursive Queries? > > Uhm, I posted two weeks ago saying I had to shelve that temporarily. > > On the other hand I've submitted a patch to reduce the storage overhead of > varlenas u

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Richard Broersma Jr
> That's why you make a table for every device or every measurement, and > then use a view to consolidate it. With update-able views, there's no > excuse not to. I would be interested on here some of your experiences on this? I've built and made use of table hierarchies three levels deep and abo

Re: [HACKERS] [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 06:47:52PM -0500, Tom Lane wrote: > I wrote: > > I don't find this particularly important, because we have never intended > > direct update of catalog entries to be a primary way of interacting with > > the system. The current pg_autovacuum setup is a stopgap until the dust

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread Richard Broersma Jr
to attack eachother. > > Depending on what you're modelling, even this could be too simple -- for > example, while a single wolf is unlikely to attack a lion, a pack of > wolves have a lot more probability of doing so. > > Do you keep packs of wolves in your barn? If so, watch your lions. Well

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Tom Lane
I wrote: > I don't find this particularly important, because we have never intended > direct update of catalog entries to be a primary way of interacting with > the system. The current pg_autovacuum setup is a stopgap until the dust > has settled enough that we know what sort of long-term API we w

Re: [GENERAL] db stats vs table stats

2007-02-23 Thread Ed L.
On Friday February 23 2007 3:06 pm, Ed L. wrote: > > I've been periodically collecting the stats stored in > > pg_statio_all_tables and pg_stat_database for ~30 different > > clusters, and have noticed a curiosity... The table-level IO stats > > appear to be typically 1-2 orders of magnitude larger

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Mark Stosberg wrote: >> Adding a default of -1 seems like a more cumbersome way to express the >> same thing to me. > To be frank, I don't remember what the rationale was for not using > NULLs. Simplicity of code, I guess. We tend to avoid allowing fi

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Martijn van Oosterhout
On Fri, Feb 23, 2007 at 02:50:48PM -0800, Glen Parker wrote: > I can and do solve the problem by simply not using NULL in character > fields, and by the rather gratuitous use of coalesce() in queries. I'm confused. If you don't use NULLs then you don't need coalesce either. > The > problem is

Re: [GENERAL] [HACKERS] urgent: upgraded to 8.2, getting kernel panics

2007-02-23 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > On friday we upgraded a critical backend server to postgresql 8.2 > running on fedora core 4. Umm ... why that particular choice of OS? Red Hat dropped update support for FC4 some time ago, and AFAIK the Fedora Legacy project is not getting things do

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Peter Eisentraut
Ron Johnson wrote: > Each of the daily/hourly/etc temperature readings are independent. > Therefore they should each have their own row in the "meteorology > readings" table. I *think* that breaks 3NF. If everything is, as you say, independent, then there can be no 3NF violation, because that on

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
Ben wrote: What I read was that you have no use for NULLs, and that they're equivilant to zero or an empty string or some other known value. Sorry if I misunderstood that. Equivalent, yes, because NULL doesn't usually mean UNKNOWN in this system, just NOT ENTERED. I do still have use for NUL

Re: [HACKERS] Re: [GENERAL] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Josh Berkus
Jeff, > I am still on target. I'm scheduling some benchmarks on real hardware > and real queries in the next week or two. If those show the results I > expect, I'll be ready before feature freeze. Send me a patch against 8.2.3 and I'll pass it to the Sun benchmarking team. -- --Josh Josh Berk

Re: [GENERAL] Priorities for users or queries?

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 12:07:56PM -0800, Ron Mayer wrote: > Jim Nasby wrote: > > The problem with using simple OS priority settings is you leave yourself > > wide open to priority inversion. > > Which is why you either > (a) note that papers studying priority inversion on RDBMS's > find tha

Re: [GENERAL] urgent: upgraded to 8.2, getting kernel panics

2007-02-23 Thread Devrim GUNDUZ
On Fri, 2007-02-23 at 17:14 -0500, Merlin Moncure wrote: > BUG: spinlock recursion CPU0 postmaster...not tainted. > Has anybody seen any problem like this or have any suggestions about > possible resolution...should I be posting to the LKML? AFAIR (+ some quick Googling), this is related to

Re: [GENERAL] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Jeff Davis
On Fri, 2007-02-23 at 13:24 -0800, Joshua D. Drake wrote: > Jeff Davis: Synchronized scanning I am still on target. I'm scheduling some benchmarks on real hardware and real queries in the next week or two. If those show the results I expect, I'll be ready before feature freeze. Regards, J

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/07 15:47, Peter Eisentraut wrote: > Brandon Aiken wrote: >> That's why you make a table for every device or every measurement, >> and then use a view to consolidate it. With updatable views, there's >> no excuse not to. > > No, you put them

Re: [GENERAL] Priorities for users or queries?

2007-02-23 Thread Ron Mayer
Benjamin Arai wrote: > My problem with [1] is that even for 10 users the percentage of time > spent in locks is very high. Really? In the paper referenced in the thread you quoted, figure 1H shows TCP-C with PostgreSQL and shows that time spent in locks with 10 users is extremely small (about 10

[GENERAL] urgent: upgraded to 8.2, getting kernel panics

2007-02-23 Thread Merlin Moncure
Ok, This may the wrong place to look for answers to this, but I figured it couldn't hurt...so here goes: On friday we upgraded a critical backend server to postgresql 8.2 running on fedora core 4. Since then we have received three kernel panics during periods of moderate to high load (twice dur

Re: [GENERAL] db stats vs table stats

2007-02-23 Thread Ed L.
Oops, typo: I reversed the inequality. I've corrected it below. On Friday February 23 2007 2:02 pm, Ed L. wrote: > I've been periodically collecting the stats stored in > pg_statio_all_tables and pg_stat_database for ~30 different > clusters, and have noticed a curiosity. > > I would have though

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread David Fetter
On Fri, Feb 23, 2007 at 09:39:52AM -0500, Robert Haas wrote: > Actually, what would be really nice is if there were just a button I > could push that would make all of my data automatically correct. > Can that go into 8.3? Thanks, ...Robert Oh, no problem. Just compile with -ldwim ;) Cheers, D

[GENERAL] Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Joshua D. Drake
Gregory Stark wrote: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > >> Greg Stark: WITH/Recursive Queries? > > Uhm, I posted two weeks ago saying I had to shelve that temporarily. I can't read every email :) Can someone pick this up? This would be the second time that this has been dropped.

Re: [GENERAL] [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Gregory Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Greg Stark: WITH/Recursive Queries? Uhm, I posted two weeks ago saying I had to shelve that temporarily. On the other hand I've submitted a patch to reduce the storage overhead of varlenas under 128 bytes by 3-7 bytes each. -- Gregory Stark

Re: [GENERAL] Writing oracle/postgress generic SQL

2007-02-23 Thread David Fetter
On Fri, Feb 23, 2007 at 08:28:06AM -0800, Richard Troy wrote: > > On Fri, 23 Feb 2007, David Fetter wrote: > > On Fri, Feb 23, 2007 at 10:23:56AM +0100, Ben Edwards wrote: > > > Anyone know of any guidelines for writing SQL which works under > > > Oracle witch will also work under postgress. This

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
It cannot already do what I want, unless you blatantly ignore what I wrote. Putting coalesce() calls *everywhere* counts as more work, don't you agree? -Glen Ben wrote: But, why do you need an extension when the existing system can already do what you want? ---(en

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Peter Eisentraut
Brandon Aiken wrote: > That's why you make a table for every device or every measurement, > and then use a view to consolidate it. With updatable views, there's > no excuse not to. No, you put them all on one table and put nulls in places where no data is available. With real database systems,

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Chad Wagner
On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > In any case if anyone is interested I was able to reproduce the changes that > wikipgedia made and applied those changes (as well as others) all the way up > to the 1.6.10 codebase. The only reason I mention this is because 1.6is > the only ch

[GENERAL] Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Joshua D. Drake
> The only thing I can think of is to remove the support for ancient COPY > syntax from psql's \copy, as suggested here: > http://archives.postgresql.org/pgsql-hackers/2007-02/msg01078.php > > That's hardly a feature - more a matter of tidying up. I thought you were being sponsored for something

[GENERAL] Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Joshua D. Drake
>> >> Neil Conway: pgmemcache >> Josh Drake: pgmemcache >> > > > what does this refer to? Neil is cleaning up the code, I am cleaning up the docs. Joshua D. Drake > > > cheers > > andrew > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564

[GENERAL] Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Andrew Dunstan
Joshua D. Drake wrote: Andrew Dunstan: Something with COPY? Andrew? The only thing I can think of is to remove the support for ancient COPY syntax from psql's \copy, as suggested here: http://archives.postgresql.org/pgsql-hackers/2007-02/msg01078.php That's hardly a feature - more a mat

[GENERAL] 5 Weeks till feature freeze or (do you know where your patch is?)

2007-02-23 Thread Joshua D. Drake
Hello, 5 weeks to feature freeze folks. Please provide updates including if you think you will have a patch submitted before feature freeze. Be realistic, if you can't make it -- say so. Alvaro Herrera: Autovacuum improvements (maintenance window etc..) Gavin Sherry: Bitmap Indexes (on disk), po

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Alvaro Herrera
Mark Stosberg wrote: > Jim C. Nasby wrote: > > On Fri, Feb 23, 2007 at 04:08:45PM -0300, Alvaro Herrera wrote: > >> Mark Stosberg wrote: > >>> I just tried to add something to the pg_autovacuum table for the first > >>> time today (with 8.1). I wanted to make the simplest possible entry: > >>> Disa

[GENERAL] db stats vs table stats

2007-02-23 Thread Ed L.
I've been periodically collecting the stats stored in pg_statio_all_tables and pg_stat_database for ~30 different clusters, and have noticed a curiosity. I would have thought that for a given period, the change in pg_stat_database.blks_read would be <= the sum of the changes in pg_statio_user

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Mark Stosberg
Jim C. Nasby wrote: > On Fri, Feb 23, 2007 at 04:08:45PM -0300, Alvaro Herrera wrote: >> Mark Stosberg wrote: >>> I just tried to add something to the pg_autovacuum table for the first >>> time today (with 8.1). I wanted to make the simplest possible entry: >>> Disable auto-vacuuming for a table. H

Re: [GENERAL] Priorities for users or queries?

2007-02-23 Thread Benjamin Arai
My problem with [1] is that even for 10 users the percentage of time spent in locks is very high. Can priorities scale? Benjamin Ron Mayer wrote: Bruce Momjian wrote: Hard to argue with that. Is it a strong enough argument to add a TODO? I'm thinking some sort of TODO might be cal

[GENERAL] Restore After Changing Table Structures

2007-02-23 Thread Jeanna Geier
Hello List! We're working on restructuring some of our tables in our databases (removing, renaming, &/or adding columns to tables), & adding tables to the database, etc. - and we have a database FULL of info that we want to restore this database with once the updates are done; however, I know that

Re: [GENERAL] Ruby on Rails for PostgreSQL

2007-02-23 Thread Dave Page
Jim C. Nasby wrote: On Fri, Feb 23, 2007 at 01:25:25PM +, Dave Page wrote: I'd like to invite anyone who is interested to download and try it out, and report any issues or problems using the project's trackers on pgFoundry. Wow, that's great! Thanks! Do you think something like this co

Re: [GENERAL] Password issue revisited

2007-02-23 Thread Bruce Momjian
I assume this is not a TODO. --- Magnus Hagander wrote: > >>> The default on *all* windows versions since NT 4.0 (which is when the > >>> directory we use was added) will put this file in a protected directory. > >>> The onl

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tino Wildenhain
Glen Parker schrieb: Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? Because I DO need NULLS for non text fields, and I st

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
That's absolutely correct. What I want is a totally non standard *optional* extension, recognizing that many, even if not most, applications could benefit from it. I think there's a clean way to do it. I would never ask for such a thing if I thought it would effect an out of the box installa

Re: [GENERAL] Priorities for users or queries?

2007-02-23 Thread Ron Mayer
Jim Nasby wrote: > The problem with using simple OS priority settings is you leave yourself > wide open to priority inversion. Which is why you either (a) note that papers studying priority inversion on RDBMS's find that it's a non issue on many RDBMS workloads; and (except for real-tim

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? Because I DO need NULLS for non text fields, and I still want NULL to comp

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tino Wildenhain
Steve Crawford schrieb: Mark Walker wrote: I'm not sure what you're trying to do but, it appears that you database design is incorrect. What you need is something like CREATE TABLE temp_readings ( _date Date, temperature double, source varchar(20), ) No reading, no record. Are you suggest

Re: [pgsql-advocacy] [GENERAL] PostgreSQL on Windows Paper

2007-02-23 Thread Alvaro Herrera
Joshua D. Drake wrote: > Scott Marlowe wrote: > > On Fri, 2007-02-23 at 12:22, Chris Travers wrote: > >> Hi all; > >> > >> Microsoft has seen it fit to publish a paper I have written as an > >> introduction to PostgreSQL on Windows. This paper covers the basics of > >> installing and configuring

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 04:08:45PM -0300, Alvaro Herrera wrote: > Mark Stosberg wrote: > > I just tried to add something to the pg_autovacuum table for the first > > time today (with 8.1). I wanted to make the simplest possible entry: > > Disable auto-vacuuming for a table. However, the data model

Re: [GENERAL] false unique constraint error...for me

2007-02-23 Thread djé djé
you were right, the server uses "lc_collateen_US.utf8". quite amazing situation. As you mentioned, I replaced the column type (bytea instead of varchar) and some code (text2code128 now returns bytea instead of text, using decode function). I have been able to insert my data without prob

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Alvaro Herrera
Mark Stosberg wrote: > I just tried to add something to the pg_autovacuum table for the first > time today (with 8.1). I wanted to make the simplest possible entry: > Disable auto-vacuuming for a table. However, the data model requires > that I also enter values for: > > vac_base_thresh You can u

Re: [GENERAL] PostgreSQL on Windows Paper

2007-02-23 Thread Joshua D. Drake
Scott Marlowe wrote: > On Fri, 2007-02-23 at 12:22, Chris Travers wrote: >> Hi all; >> >> Microsoft has seen it fit to publish a paper I have written as an >> introduction to PostgreSQL on Windows. This paper covers the basics of >> installing and configuring the software. I thought it might be

Re: [GENERAL] PostgreSQL on Windows Paper

2007-02-23 Thread Scott Marlowe
On Fri, 2007-02-23 at 12:22, Chris Travers wrote: > Hi all; > > Microsoft has seen it fit to publish a paper I have written as an > introduction to PostgreSQL on Windows. This paper covers the basics of > installing and configuring the software. I thought it might be of > interest here so her

[GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Mark Stosberg
I just tried to add something to the pg_autovacuum table for the first time today (with 8.1). I wanted to make the simplest possible entry: Disable auto-vacuuming for a table. However, the data model requires that I also enter values for: vac_base_thresh vac_scale_factor anl_base_thres anl_scale_f

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Susemail
On Thursday 22 February 2007 05:10, Rich Shepard wrote: > On Thu, 22 Feb 2007, Tim Tassonis wrote: > > I do still think it is a bit of an oddity, the concept of the null > > column. From my experience, it creates more problems than it actually > > solves and generally forces you to code more rather

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Steve Crawford
Glen Parker wrote: > Buy the same token, some application have no use whatsoever for the > distinction between NULL and ''. In that case, the distinction just > adds work. True, I suppose. But if I need that, I can live with a one-time "...not null default ''..." addition to my table definition.

[GENERAL] PostgreSQL on Windows Paper

2007-02-23 Thread Chris Travers
Hi all; Microsoft has seen it fit to publish a paper I have written as an introduction to PostgreSQL on Windows. This paper covers the basics of installing and configuring the software. I thought it might be of interest here so here is the link: http://port25.technet.com/archive/2007/02/22

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Brandon Aiken
That's why you make a table for every device or every measurement, and then use a view to consolidate it. With updatable views, there's no excuse not to. -- Brandon Aiken CS/IT Systems Engineer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Crawfo

Re: [GENERAL] Writing oracle/postgress generic SQL

2007-02-23 Thread SCassidy
I've converted stuff from PostgreSQL to Oracle before, and some of the biggest pains were "OFFSET ... LIMIT ..." in PostgreSQL vs. ROWNUM or ROW_NUMBER in Oracle (depending on version of Oracle, including having to wrap the query with ROWNUM/ROW_NUMBER in a subselect - I greatly prefer OFFSET a

Re: [GENERAL] Ruby on Rails for PostgreSQL

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 01:25:25PM +, Dave Page wrote: > Given the recent discussions of applications stacks, PHP & Ruby etc. it > seems an ideal time for me to introduce a project I've been working on. > > StackBuilder is an extension of the Windows installer for PostgreSQL > that will allow

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Steve Crawford
Mark Walker wrote: > I'm not sure what you're trying to do but, it appears that you database > design is incorrect. What you need is something like > > CREATE TABLE temp_readings > ( > _date Date, > temperature double, > source varchar(20), > ) > > No reading, no record. Are you suggesting t

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 01:49:06PM +1300, Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >That depends greatly on what you're doing with it. Generally, as soon > >as you start throwing a multi-user workload at it, MySQL stops > >scaling. http://tweakers.net recently d

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Scott Ribe
> In that case, the distinction just > adds work. In that case you declare the column not null and don't use nulls. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)--- TIP 1: if posting/readi

Re: [GENERAL] Writing oracle/postgress generic SQL

2007-02-23 Thread Guy Rouillier
Ben Edwards wrote: Anyone know of any guidelines for writing SQL which works under Oracle witch will also work under postgress. This is to ensure that SQL written for an Oracle database can be migrated to postgress later. I converted a fairly complex data collection application from Oracle to

Re: [GENERAL] ODBCng and OpenOffice 2.1

2007-02-23 Thread Joshua D. Drake
Hannes Dorbath wrote: > I tried to connect OpenOffice 2.1 Base (win32) via ODBCng to a PG 8.1.5 > database. > > While it lists schemas, tables and views just fine, I'm unable to edit > data. OO always returns: > > The data content could not be loaded > Invalid descritor index > SQL Status: 07009

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tommy Gildseth
Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? which is what mySQL does by default :-) The statement CREATE TABLE foo

Re: [GENERAL] PGSQL Locking vs. Oracle's MVCC

2007-02-23 Thread Joshua D. Drake
RPK wrote: > How is PGSQL Locking compared with Oracle's MVCC? How PGSQL handles > concurreny and how it differs with Oracle's Multi-Version Concurrency > Control (MVCC)? PostgreSQL uses MVCC. http://www.postgresql.org/docs/8.2/static/mvcc.html Joshua D. Drake -- === The PostgreSQL C

Re: [GENERAL] Writing oracle/postgress generic SQL

2007-02-23 Thread Richard Troy
On Fri, 23 Feb 2007, David Fetter wrote: > On Fri, Feb 23, 2007 at 10:23:56AM +0100, Ben Edwards wrote: > > Anyone know of any guidelines for writing SQL which works under > > Oracle witch will also work under postgress. This is to ensure that > > SQL written for an Oracle database can be migrate

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread cedric
Le vendredi 23 février 2007 16:37, Ian Harding a écrit : > On 2/22/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Joshua D. Drake escribió: > > > Andrej Ricnik-Bay wrote: > > > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > > > >> That depends greatly on what you're doing with it. Generall

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Ian Harding
On 2/22/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Joshua D. Drake escribió: > Andrej Ricnik-Bay wrote: > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >> That depends greatly on what you're doing with it. Generally, as soon > >> as you start throwing a multi-user workload at it, MySQL

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread Stephan Szabo
On Fri, 23 Feb 2007, Joris Dobbelsteen wrote: > >-Original Message- > >From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] > >Sent: vrijdag 23 februari 2007 9:50 > >To: Joris Dobbelsteen > >Cc: pgsql-general@postgresql.org > >Subject: Re: [GENERAL] complex referential integrity constra

Re: [GENERAL] false unique constraint error...for me

2007-02-23 Thread Tom Lane
=?iso-8859-1?B?ZGrpIGRq6Q==?= <[EMAIL PROTECTED]> writes: > I get the error : ERROR: duplicate key violates unique constraint > "unique_barcode128" > But the string returned by text2code128('AB28662097') and > text2code128('AB28662098') are different!!!, i.e., respectively ÌABÇ and ÌABÇ

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible with plpgsql? Do I have to install the perl lang

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread Joris Dobbelsteen
>-Original Message- >From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] >Sent: vrijdag 23 februari 2007 9:50 >To: Joris Dobbelsteen >Cc: pgsql-general@postgresql.org >Subject: Re: [GENERAL] complex referential integrity constraints > >On Fri, Feb 23, 2007 at 12:41:25AM +0100, Joris Dob

[GENERAL] false unique constraint error...for me

2007-02-23 Thread djé djé
Hi all, I don't know if it's a bug or not...but things are quite strange for me. My problem comes from a unique constraint violation whereas tha data I try to insert in my table are different (at least for me). My database is encoded using SQL_ASCII, postgresql 7.4.8 on a Red Hat Advanced Server

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Tom Lane
"Anton Melser" <[EMAIL PROTECTED]> writes: > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible with plpgsql? Do I have to install the perl language? You need plperl (or pltcl; likely plpython w

Re: [GENERAL] Warning "TupleDesc reference leak"

2007-02-23 Thread Tom Lane
Marek Lewczuk <[EMAIL PROTECTED]> writes: > Thanks for reply. You need a test case, but what it should include ? I > don't know in what situations this warning is thrown. My database is > quite large - hundreds of tables, tons of data... Where I should start ? I doubt it's got anything to do wit

Re: [GENERAL] server closed unexpectedly while executing a function

2007-02-23 Thread Michael Fuhr
On Fri, Feb 23, 2007 at 09:34:51AM -0500, Jasbinder Singh Bali wrote: > To add to my last post, > in my perl function I'm using > > use DBI; > my $dbh=DBI->connect("dbi:Pg:dbname=xyz; host=192.168.0.120; port=5432;", > "", ""); > > to connect to the same DB server. > > And then i have series of

Re: [GENERAL] Infinite loop in transformExpr()

2007-02-23 Thread Fernando Schapachnik
En un mensaje anterior, Tom Lane escribió: > PG versions before 8.2 don't handle very long IN lists particularly > well. This query will take a fair amount of stack space to parse, not > to mention an unreasonably long time to plan. (You should consider > putting the 16000 values in a temp table

Re: [GENERAL] greedy or not? regexps...

2007-02-23 Thread Anton Melser
Intellectually challenged Anton strikes again! I wanted +, not *. Sometimes I think I'm not cut out for IT! :-( Thanks heaps, Anton On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I am trying to understand the function substring. You haven't actuall

Re: [GENERAL] Writing oracle/postgress generic SQL

2007-02-23 Thread Tom Lane
"Ben Edwards" <[EMAIL PROTECTED]> writes: > Anyone know of any guidelines for writing SQL which works under Oracle > witch will also work under postgress. The only thing that means anything is testing on both :-(. Yeah, there is a SQL standard, but there is no DBMS anywhere in the world that impl

Re: [GENERAL] greedy or not? regexps...

2007-02-23 Thread Tom Lane
"Anton Melser" <[EMAIL PROTECTED]> writes: > I am trying to understand the function substring. You haven't actually said anything that sounded surprising; and in any case, without seeing the data being operated on, we can't comment much on what's happening. I will note that '=([0-9]*)' is going t

Re: [GENERAL] Supported plpgsql BEFORE ... EACH ROW behavior

2007-02-23 Thread Karl O. Pinc
On 02/23/2007 02:03:25 AM, Richard Huxton wrote: Karl O. Pinc wrote: I want to write a plpgsql function for use as a BEFORE ... EACH ROW function. I want to modify other tables even when the function returns NULL and therefore the table on which the BEFORE trigger is defined is not updated.

Re: [GENERAL] Warning "TupleDesc reference leak"

2007-02-23 Thread Marek Lewczuk
Tom Lane pisze: Marek Lewczuk <[EMAIL PROTECTED]> writes: after suggestions that I should postgres update to the latest (currently I have 8.2.3) I thought that my problem will be solved. But no, it is not - postgres still throws warnings: WARNING: TupleDesc reference leak: TupleDesc 0x41fd7018

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread Alvaro Herrera
Alban Hertroys wrote: > Robert Haas wrote: > > The idea here is that a wolf can attack a sheep, or a wolf can attack > > another wolf, but sheep can't attack anything. I suppose I could list > > each wolf in both the predator and prey tables, but that seems a bit > > duplicative (and causes other

Re: [GENERAL] server closed unexpectedly while executing a function

2007-02-23 Thread Jasbinder Singh Bali
To add to my last post, in my perl function I'm using use DBI; my $dbh=DBI->connect("dbi:Pg:dbname=xyz; host=192.168.0.120; port=5432;", "", ""); to connect to the same DB server. And then i have series of dbh->prepare and ->execute Unofrtunately it has started crying smth like no connection t

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Peter Childs <[EMAIL PROTECTED]> wrote: On 23/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: > Hi, > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible with plpgsql? Do I have to i

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Bill Moran
In response to "Chad Wagner" <[EMAIL PROTECTED]>: > On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > > > > I installed wikipgdia for the WPLUG wiki: > > http://wplug.ece.cmu.edu/wiki/ > > Isn't that the same wikipgedia that is found at pgFoundry? Yes. > The only issue I > really had the the

[GENERAL] server closed unexpectedly while executing a function

2007-02-23 Thread Jasbinder Singh Bali
Hi I'm running a function in perl and it says --- NOTICE: DBD::Pg::st execute failed: server closed the connection unexpectedly This probably means the server termin

Re: [GENERAL] ODBCng and OpenOffice 2.1

2007-02-23 Thread Richard Huxton
Hannes Dorbath wrote: I tried to connect OpenOffice 2.1 Base (win32) via ODBCng to a PG 8.1.5 database. The data content could not be loaded Invalid descritor index SQL Status: 07009 You tried to set a parameter at position 1 but there is/are only 0 parameter(s) allowed. One reason may be tha

Re: [GENERAL] Warning "TupleDesc reference leak"

2007-02-23 Thread Tom Lane
Marek Lewczuk <[EMAIL PROTECTED]> writes: > after suggestions that I should postgres update to the latest (currently > I have 8.2.3) I thought that my problem will be solved. But no, it is > not - postgres still throws warnings: > WARNING: TupleDesc reference leak: TupleDesc 0x41fd7018 (16427,-1

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Peter Childs
On 23/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: Hi, I need to be able to get all the matches for a particular regexp from a text field that I need to use in another query in a function. Is this possible with plpgsql? Do I have to install the perl language? Cheers Anton -

  1   2   >