Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Martijn van Oosterhout
On Thu, Nov 15, 2007 at 08:09:46PM -0800, Willem Buitendyk wrote: Damn - so the unqiue contraint is still an issue. What gives? Why is it so hard to implement this in Postgresql? sigh - if only I had more time. Can you explain? The server ofcourse still generates error messages in the logs,

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Ow Mun Heng
On Fri, 2007-11-16 at 09:00 +0800, Ow Mun Heng wrote: I'm trying to do some periodic updates from another DB and would like to know the # of updates/inserts/deletes from that job. I usually write a function which gets/uses the GETS DIAGNOSTIC ROW COUNT parameter which will tell me how many

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Reg Me Please
Il Friday 16 November 2007 08:33:14 Tom Lane ha scritto: Reg Me Please [EMAIL PROTECTED] writes: The OP's complaint is that we don't allow a variable of the query's own level, but AFAICT he's still not grasped the point that that leads to an indeterminate limit value ... So it works,

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Martijn van Oosterhout
On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote: I usually write a function which gets/uses the GETS DIAGNOSTIC ROW COUNT parameter which will tell me how many rows were affected by the query. Now, for this case, I'm not writing a function but merely using a normal SQL eg: The

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote: I'm trying to do some periodic updates from another DB and would like to know the # of updates/inserts/deletes from that job. Humm; it would be nice if you could use the new RETURNING construct that's been introduced in 8.2, i.e.

Re: [GENERAL] public schema doubt

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 10:26 AM, [EMAIL PROTECTED] wrote: Hello Martin, Yes, SHOW search_path show this $user,public . Oh yes, I get it now, the $user will take priority. Another question, this public schema, in the usual practice way, do you delete it or just leave it there and create your

Re: [GENERAL] public schema doubt

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 8:56 AM, [EMAIL PROTECTED] wrote: Hello, I did a migration from 8.2.4 to 8.2.5, Just FYI, from 8.2.4 to 8.2.5 doesn't require a dump / restore, you can update minor versions in place. I used pg_dumpall to backup all the db and then restore it into 8.2.5. In my 8.2.4 db, I

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Ow Mun Heng
On Fri, 2007-11-16 at 10:22 +0100, Martijn van Oosterhout wrote: On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote: I usually write a function which gets/uses the GETS DIAGNOSTIC ROW COUNT parameter which will tell me how many rows were affected by the query. Now, for this

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Erik Jones
On Nov 16, 2007, at 3:26 AM, Ow Mun Heng wrote: On Fri, 2007-11-16 at 10:22 +0100, Martijn van Oosterhout wrote: On Fri, Nov 16, 2007 at 09:00:46AM +0800, Ow Mun Heng wrote: I usually write a function which gets/uses the GETS DIAGNOSTIC ROW COUNT parameter which will tell me how many rows

[GENERAL] public schema doubt

2007-11-16 Thread mailtolouis2020-postgres
Hello, I did a migration from 8.2.4 to 8.2.5, I used pg_dumpall to backup all the db and then restore it into 8.2.5. In my 8.2.4 db, I don't have public schema (it was dropped when I create the db, so only myschema is there), but when I restore to 8.2.5, I found that it created a public

Re: [GENERAL] Request for suggestion on replication methods

2007-11-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I'm new to PostgreSQL and I'd like to know what are the replication methods available on PostgreSQL and what version of PostgreSQL should I install for it. The answer to the second part is the most recent possible. You might even want to

[GENERAL] Substitute column in SELECT with static value?

2007-11-16 Thread Stefan Schwarzer
Hi there, I run an aggregation on national statistics to retrieve regional values (for Africa, Europe, ...). Now, I want to have a global aggregation as well. The easiest thing for my PHP/HTML procedure would be to have the global row make appear within the regional result. So it would

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Raymond O'Donnell
On 16/11/2007 10:02, Sam Mason wrote: SELECT COUNT(*) FROM ( DELETE FROM foo RETURNING 1) x; I haven't played with this yet, but AFAICS this will simply return the integer value 1. Ray. --- Raymond O'Donnell, Director of

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Tom Lane
Sam Mason [EMAIL PROTECTED] writes: wow, that's kind of fun isn't it. I only thought you could put a constant in there. Maybe I should have had a look in the grammar/tested it first! IIRC, it used to be restricted to a constant, a few revisions back. In current releases the only restriction

Re: [GENERAL] Substitute column in SELECT with static value?

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 4:26 AM, Stefan Schwarzer [EMAIL PROTECTED] wrote: Hi there, I run an aggregation on national statistics to retrieve regional values (for Africa, Europe, ...). Now, I want to have a global aggregation as well. The easiest thing for my PHP/HTML procedure would be to have the

Re: [GENERAL] moving from mysql to postgree

2007-11-16 Thread Pau Marc Munoz Torres
Thanks every body, today i've created my first table with postgresql, what a mass with \d table and sequancial vs auto_increment data type in create... anyway, i will become an expert soon ;-) thanks again pau 2007/11/16, Merlin Moncure [EMAIL PROTECTED]: On Nov 15, 2007 10:44 AM, Pau Marc

Re: [GENERAL] Question about PostgreSQL from Delphi newsgroups

2007-11-16 Thread Andrew Sullivan
On Thu, Nov 15, 2007 at 03:00:00PM -0600, Tony Caduto wrote: Do you know if using PostgreSQL a query or connection can have a priority set, so it can run quicker than other queries? No, it can't. The archives contain a lot of discussion about this issue. Look in -performance first, I

[GENERAL] unexplainable error

2007-11-16 Thread [EMAIL PROTECTED]
I have Apache/php/PostgreSQL on FreeBSD, all latest stable versions. Every time, after mass import into the database (it's a development server, so the import updates the database with full dump from the production server) - the first several clicks on the development web site return -

Re: [GENERAL] pl-pgsql return set of... return next... performance question

2007-11-16 Thread Pavel Stehule
Hello I noticed that it takes a long time to return the set of records. But if I run the same query at the psql cli, it runs blindingly fast. So it appears that the process of returning the records via return next is the performance culprit. Any ideas? Try use holdable cursors

Re: [GENERAL] moving from mysql to postgree

2007-11-16 Thread Merlin Moncure
On Nov 15, 2007 10:44 AM, Pau Marc Munoz Torres [EMAIL PROTECTED] wrote: I'm moving from mysql to postgresql just now i I'm a bit lost, could anyone tell me some place with a comparative between postdresql and mysql commands, i think than mostly is the same think but, any way, do anything

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Trevor Talbot
On 11/16/07, Reg Me Please [EMAIL PROTECTED] wrote: Il Friday 16 November 2007 08:33:14 Tom Lane ha scritto: Let me try to explain one more time. You propose allowing select ... from table1 join table2 on table1.x = table2.y limit table1.z Now this would be

[GENERAL] postgres 8 on solaris 9

2007-11-16 Thread Thomas Finneid
Hi I need to run latest Pg, i.e. 8.x, on a solaris 9 sparc machine, does anybody know of any prepackaged pg for that or any documentation that discusses compiling the source on such a machine. The Sun site only discusses how to do this in solaris 10. Pointers would be much appreciated.

Re: [GENERAL] public schema doubt

2007-11-16 Thread mailtolouis2020-postgres
Hello Martin, Yes, SHOW search_path show this $user,public . Oh yes, I get it now, the $user will take priority. Another question, this public schema, in the usual practice way, do you delete it or just leave it there and create your own schema? Regards Louis - Original Message

Re: [GENERAL] Common criteria evaluation?

2007-11-16 Thread Greg Smith
On Fri, 16 Nov 2007, Tom Lane wrote: Greg Smith [EMAIL PROTECTED] writes: Right, by NTT: http://www.nttdata.co.jp/services/postgreSQL/english.html Were those mods ever submitted upstream? As far as I can tell they weren't even released offically. I didn't see any source RPMs, just the

Re: [GENERAL] Primary Key

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote: How many fields is recomended to create a primary key? I'm thinking to create one with 6 fields, is much? Normally a primary key would just be a single column. When you start going to that many I'd probably have a serial

Re: [GENERAL] XML schema

2007-11-16 Thread Sean Davis
On Nov 15, 2007 6:20 PM, Peter Eisentraut [EMAIL PROTECTED] wrote: Sean Davis wrote: Is the current XML datatype (in 8.3) the direction of the future, or is something more akin to a dedicated XML schema (I think this is the route that Oracle has gone) going to be important? An XML schema

Re: [GENERAL] unexplainable error

2007-11-16 Thread Tom Lane
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: I have Apache/php/PostgreSQL on FreeBSD, all latest stable versions. Every time, after mass import into the database (it's a development server, so the import updates the database with full dump from the production server) - the first several

Re: [GENERAL] [ADMIN] PostgreSQL - Services delivery query ?

2007-11-16 Thread Joshua D. Drake
Dhas Jeba G wrote: Hello Team, We are working on a Large Size Opportunity with a Govt Institution in India The following link mentions about Post Gres Support and it associated cost http://www.sun.com/software/products/postgresql/support.jsp However we need to know the

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Willem Buitendyk
My apologies. I misinterpreted that last post. I have not been able to try pgloader as I am using the windows platform. Martijn van Oosterhout wrote: On Thu, Nov 15, 2007 at 08:09:46PM -0800, Willem Buitendyk wrote: Damn - so the unqiue contraint is still an issue. What gives? Why is

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 20:00:29 + Sam Mason [EMAIL PROTECTED] wrote: Normally a primary key would just be a single column. When you start going to that many I'd probably have a serial column as the primary key, and a UNIQUE index on those

Re: [GENERAL] Primary Key

2007-11-16 Thread Sam Mason
( Fi Fie Foe Fum, I smell the blood of a religious war ) On Fri, Nov 16, 2007 at 01:03:23PM -0600, Ron Johnson wrote: On 11/16/07 12:54, Sam Mason wrote: On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote: How many fields is recomended to create a primary key? I'm

Re: [GENERAL] field doesn't exist even though I'm sure it does

2007-11-16 Thread Tom Hart
Sam Mason wrote: On Fri, Nov 16, 2007 at 03:13:48PM -0500, Tom Hart wrote: column isactive of relation membermailingaddress does not exist Table public.membermailingaddress Column | Type | Modifiers -+--+--- IsActive| boolean

Re: [GENERAL] field doesn't exist even though I'm sure it does

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 03:13:48PM -0500, Tom Hart wrote: column isactive of relation membermailingaddress does not exist Table public.membermailingaddress Column | Type | Modifiers -+--+--- IsActive| boolean | If you

Re: [GENERAL] pl-pgsql return set of... return next... performance question

2007-11-16 Thread Gauthier, Dave
I don't think so. Here's why As an experiment, I created another temp table with records identical to what will be returned in the set. Then I loaded that temp table with all the results to be returned. And finally, I returned * from that table. I inserted raise notice statements to

Re: [GENERAL] Primary Key

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 12:06:46PM -0800, Joshua D. Drake wrote: When that is needed I do this: create table foo(id serial unique, a text, b text, primary (a,b)); Humm, so the other way around from what I've ended up doing. I'll need to think about the implications of changing things around

[GENERAL] field doesn't exist even though I'm sure it does

2007-11-16 Thread Tom Hart
Hey everybody. I've got a strange one today. I'm trying to convert an extremely messy access sql query into something that can be used with our postgresql database (the pgsql db is being built to replace the access db). I had barely begun trying to convert it when I was confronted with this

Re: [GENERAL] ERROR: out of memory

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 1:48 AM, Anton [EMAIL PROTECTED] wrote: My machine has 2G RAM. And I want make postgres utilize it... You're trying to tune your database based on philosophy. Making postgresql use all the RAM may or may not make your machine run faster. The OS caches a lot of data for you, so

Re: [GENERAL] pg_dump problem

2007-11-16 Thread SHARMILA JOTHIRAJAH
No...I dont have slony installed. Its not a replica sharmila - Original Message From: Andrew Sullivan [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Thursday, November 15, 2007 1:03:48 PM Subject: Re: [GENERAL] pg_dump problem On Wed, Nov 14, 2007 at 10:32:54AM -0800,

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 12:51:07PM +, Raymond O'Donnell wrote: On 16/11/2007 10:02, Sam Mason wrote: SELECT COUNT(*) FROM ( DELETE FROM foo RETURNING 1) x; I haven't played with this yet, but AFAICS this will simply return the integer value 1. I currently get a syntax error,

[GENERAL] Primary Key

2007-11-16 Thread João Paulo Zavanela
Hello, How many fields is recomended to create a primary key? I'm thinking to create one with 6 fields, is much? Thanks! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Primary Key

2007-11-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/16/07 12:54, Sam Mason wrote: On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote: How many fields is recomended to create a primary key? I'm thinking to create one with 6 fields, is much? Normally a primary key would just

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 13:03:23 -0600 Ron Johnson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/16/07 12:54, Sam Mason wrote: On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote: How many fields

Re: [GENERAL] XML schema

2007-11-16 Thread Peter Eisentraut
Sean Davis wrote: I meant a schema that represents a general mapping between XML and a relational schema.  In other words, I am looking for tools that use postgresql as the storage engine for a native XML database. There are ideas for that, but nothing to be expected any time soon. -- Peter

[GENERAL] automating backups with windows scheduled tasks and pg_dumpall

2007-11-16 Thread Tom Hart
Hello everybody. I'm having a bit of trouble automating pg_dumpall to do nightly backups. I have a batch file whose contents are below SET PGPASSFILE=C:\foo\bar\PG_BACKUP\PGPASSFILE\pgpass.conf C:\Program Files\PostgreSQL\8.2\bin\pg_dumpall.exe -U foo_postgres C:\foo\bar\PG_BACKUP\db.out

Re: [GENERAL] unexplainable error

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 01:58:21PM +0100, [EMAIL PROTECTED] wrote: Every time, after mass import into the database (it's a development server, so the import updates the database with full dump from the production server) - the first several clicks on the development web site return -

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Richard Huxton
Reg Me Please wrote: Il Thursday 15 November 2007 20:28:17 hai scritto: Reg Me Please wrote: In my opinion I would say it's more a problem with the syntax checker that with the planner (semantics in my lingo). But I could be wrong. Well, what it won't let you do is have a subquery in the

Re: [GENERAL] 8.3 vs 8.2 sql compatiblity issue

2007-11-16 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Tony Caduto [EMAIL PROTECTED] wrote: I am actually getting a lot of these operator does not exist errors in 8.3 another one I get is operator does not exist for char=integer This appears to be a classic example of: Casts to text that formerly

Re: [GENERAL] Postgresql and resource isolation

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 15 Nov 2007 10:12:51 -0800 Garber, Mikhail [EMAIL PROTECTED] wrote: Hello, We are considering using Postgresql for rather large project and I have questions about where it stands in respect to the following. Consider these two

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Pavel Stehule
On 16/11/2007, Sam Mason [EMAIL PROTECTED] wrote: On Fri, Nov 16, 2007 at 12:51:07PM +, Raymond O'Donnell wrote: On 16/11/2007 10:02, Sam Mason wrote: SELECT COUNT(*) FROM ( DELETE FROM foo RETURNING 1) x; I haven't played with this yet, but AFAICS this will simply return

Re: [GENERAL] XML schema

2007-11-16 Thread Sean Davis
On Nov 16, 2007 2:14 PM, Peter Eisentraut [EMAIL PROTECTED] wrote: Sean Davis wrote: I meant a schema that represents a general mapping between XML and a relational schema. In other words, I am looking for tools that use postgresql as the storage engine for a native XML database. There

Re: [GENERAL] field doesn't exist even though I'm sure it does

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 15:25:30 -0500 Tom Hart [EMAIL PROTECTED] wrote: Ok, that makes sense. Like I said I created this db to mimic our previous db, but I think the best solution here would be to continue my trend of using all lowercase column

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 01:38:30AM -0500, Tom Lane wrote: Sam Mason [EMAIL PROTECTED] writes: wow, that's kind of fun isn't it. I only thought you could put a constant in there. Maybe I should have had a look in the grammar/tested it first! IIRC, it used to be restricted to a constant,

Re: [GENERAL] view management

2007-11-16 Thread Merlin Moncure
On Nov 16, 2007 4:02 PM, Ed L. [EMAIL PROTECTED] wrote: On Friday 16 November 2007 1:57 pm, Ed L. wrote: I have a question about view management... I often have need for views that reference views that reference views, and so on. When I need to make a small update to one of the views,

Re: [GENERAL] field doesn't exist even though I'm sure it does

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 15:13:48 -0500 Tom Hart [EMAIL PROTECTED] wrote: Addr2 | text | Addr3 | text | City| text | State | text | Zip | text | Zip5

[GENERAL] Call for translations

2007-11-16 Thread Peter Eisentraut
Some of you have already been doing a great job, but I would like to point out that with the upcoming release of PostgreSQL 8.3, it is once again time to update the message translations. We are now near a string freeze, which has traditionally been associated with the first release candidate,

Re: [GENERAL] pl-pgsql return set of... return next... performance question

2007-11-16 Thread Pavel Stehule
On 16/11/2007, Gauthier, Dave [EMAIL PROTECTED] wrote: I don't think so. Here's why As an experiment, I created another temp table with records identical to what will be returned in the set. Then I loaded that temp table with all the results to be returned. And finally, I returned *

[GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Hey guys. I have a long piece of sql that I'm trying to take out of an existing Access db and modify to work with Postgresql. I've started trying to convert it, but I've come across a problem that I don't even know how to describe, let alone google. Here's the function INSERT INTO

Re: [GENERAL] [pgtranslation-translators] Call for translations

2007-11-16 Thread Alvaro Herrera
Peter Eisentraut wrote: Some of you have already been doing a great job, but I would like to point out that with the upcoming release of PostgreSQL 8.3, it is once again time to update the message translations. We are now near a string freeze, which has traditionally been associated with

[GENERAL] view management

2007-11-16 Thread Ed L.
I have a question about view management... I often have need for views that reference views that reference views, and so on. When I need to make a small update to one of the views, I am faced with having to drop and recreate all dependent views even if the driving change just adds another

Re: [GENERAL] view management

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 13:57:24 -0700 Ed L. [EMAIL PROTECTED] wrote: I have a question about view management... I often have need for views that reference views that reference views, and so on. When I need to make a small update to one of the

Re: [GENERAL] ERROR: out of memory

2007-11-16 Thread Erik Jones
On Nov 16, 2007, at 1:48 AM, Anton wrote: Hi. I got an error when I try to VACUUM ANALYZE table. # VACUUM ANALYZE n_traf; ERROR: out of memory DETAIL: Failed on request of size 536870910. In logfile: TopMemoryContext: 33464512 total in 12 blocks; 10560 free (61 chunks); 33453952 used

Re: [GENERAL] view management

2007-11-16 Thread Ed L.
On Friday 16 November 2007 1:57 pm, Ed L. wrote: I have a question about view management... I often have need for views that reference views that reference views, and so on. When I need to make a small update to one of the views, I am faced with having to drop and recreate all dependent

[GENERAL] pl-pgsql return set of... return next... performance question

2007-11-16 Thread Gauthier, Dave
Hi: I have PL-PgSQL function that returns a set of records. It builds up 2 temp tables and then queries them to generate the set of records to be returned a-la for rrec in select t1.x, t2.x from t1, t2 where loop return next rrec; end loop; I noticed that it takes a

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Peter Eisentraut
Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other fields it's preparing to insert as variables in the determination of the values of other

Re: [GENERAL] Common criteria evaluation?

2007-11-16 Thread Greg Smith
On Fri, 16 Nov 2007, Sam Mason wrote: Just out of interest, what does EAL level 1 actually test/check for? There's a good summary of this whole process on the relevant Wikipedia pages: http://en.wikipedia.org/wiki/Evaluation_Assurance_Level http://en.wikipedia.org/wiki/Common_Criteria

Re: [GENERAL] postgres 8 on solaris 9

2007-11-16 Thread Douglas McNaught
Thomas Finneid [EMAIL PROTECTED] writes: Hi I need to run latest Pg, i.e. 8.x, on a solaris 9 sparc machine, does anybody know of any prepackaged pg for that or any documentation that discusses compiling the source on such a machine. The Sun site only discusses how to do this in solaris 10.

[GENERAL] Composite types for composite primary/foreign keys?

2007-11-16 Thread Wolfgang Keller
Hello, for some reason, I couldn't get an answer on the novice-list, so if this is the wrong place to ask or if it's just in the manual, excuse me and just drop me a hint to the place where I have to look for it... As far as I understand from the (excellent, btw.) PostgreSQL documentation,

Re: [GENERAL] [ADMIN] PostgreSQL - Services delivery query ?

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 10:49 AM, Joshua D. Drake [EMAIL PROTECTED] wrote: Dhas Jeba G wrote: Hello Team, We are working on a Large Size Opportunity with a Govt Institution in India The following link mentions about Post Gres Support and it associated cost

Re: [GENERAL] view management

2007-11-16 Thread Merlin Moncure
On Nov 16, 2007 4:01 PM, Joshua D. Drake [EMAIL PROTECTED] wrote: On Fri, 16 Nov 2007 13:57:24 -0700 Ed L. [EMAIL PROTECTED] wrote: I have a question about view management... I often have need for views that reference views that reference views, and so on. When I need to make a small

Re: [GENERAL] view management

2007-11-16 Thread Andrew Sullivan
On Fri, Nov 16, 2007 at 02:02:37PM -0700, Ed L. wrote: subtree of view dependencies just to change one minor aspect of an independent view. Well, it's not independent, if other things depend on it, is it? :) A -- Andrew Sullivan Old sigs will return after re-constitution of blue smoke

Re: [GENERAL] Primary Key

2007-11-16 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 18:54:22 + Sam Mason [EMAIL PROTECTED] wrote: On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote: How many fields is recomended to create a primary key? I'm thinking to create one with 6 fields, is much?

Re: [GENERAL] view management

2007-11-16 Thread Andrew Sullivan
On Fri, Nov 16, 2007 at 02:43:01PM -0700, Ed L. wrote: That looks about as ugly as can be. Ugh. What it appears to boil down to is that views become unusable unless you are willing to invest the effort in a complex build system. The DB You're kidding, right? You don't think that a build

Re: [GENERAL] Common criteria evaluation?

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 01:34:40PM -0500, Greg Smith wrote: On Fri, 16 Nov 2007, Sam Mason wrote: Just out of interest, what does EAL level 1 actually test/check for? There's a good summary of this whole process on the relevant Wikipedia pages:

Re: [GENERAL] Primary Key

2007-11-16 Thread Merlin Moncure
On Nov 16, 2007 3:21 PM, Sam Mason [EMAIL PROTECTED] wrote: On Fri, Nov 16, 2007 at 12:06:46PM -0800, Joshua D. Drake wrote: When that is needed I do this: create table foo(id serial unique, a text, b text, primary (a,b)); Humm, so the other way around from what I've ended up doing. I'll

Re: [GENERAL] view management

2007-11-16 Thread Ed L.
On Friday 16 November 2007 2:09 pm, Merlin Moncure wrote: you have to rig a build system.  if you have a lot of views (which is good), and keeping them up to date is a pain, you have to automate their creation. simplest way to do that is to rig a build system around sql scripts.  when you

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other fields it's preparing to insert as variables in the determination

Re: [GENERAL] view management

2007-11-16 Thread Scott Marlowe
On Nov 16, 2007 3:43 PM, Ed L. [EMAIL PROTECTED] wrote: That looks about as ugly as can be. Ugh. What it appears to boil down to is that views become unusable unless you are willing to invest the effort in a complex build system. The DB should handle this issue automatically. Does Oracle?

Re: [GENERAL] view management

2007-11-16 Thread Merlin Moncure
On Nov 16, 2007 4:43 PM, Ed L. [EMAIL PROTECTED] wrote: On Friday 16 November 2007 2:09 pm, Merlin Moncure wrote: you have to rig a build system. if you have a lot of views (which is good), and keeping them up to date is a pain, you have to automate their creation. simplest way to do that

Re: [GENERAL] Common criteria evaluation?

2007-11-16 Thread Sam Mason
On Thu, Nov 15, 2007 at 07:35:52PM -0800, Geoff wrote: I know an older version of PostgreSQL for Linux was evaluated at EAL 1 in Japan. Are there any other versions that are going through this now? Just out of interest, what does EAL level 1 actually test/check for? I'd assume that it was a

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Dimitri Fontaine
Hi all, Le Friday 16 November 2007 18:04:44 Willem Buitendyk, vous avez écrit : Martijn van Oosterhout wrote: On Thu, Nov 15, 2007 at 08:09:46PM -0800, Willem Buitendyk wrote: Damn - so the unqiue contraint is still an issue. What gives? Why is it so hard to implement this in Postgresql?

Re: [GENERAL] Primary Key

2007-11-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/16/07 12:50, João Paulo Zavanela wrote: Hello, How many fields is recomended to create a primary key? I'm thinking to create one with 6 fields, is much? The number of recommended fields is the *minimum* number required for uniqueness. 1

Re: [GENERAL] view management

2007-11-16 Thread Ed L.
On Friday 16 November 2007 2:48 pm, Scott Marlowe wrote: On Nov 16, 2007 3:43 PM, Ed L. [EMAIL PROTECTED] wrote: That looks about as ugly as can be. Ugh. What it appears to boil down to is that views become unusable unless you are willing to invest the effort in a complex build system.

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Tom Hart
Tom Hart wrote: Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other fields it's preparing to insert as variables in the

Re: [GENERAL] public schema doubt

2007-11-16 Thread Martijn van Oosterhout
On Fri, Nov 16, 2007 at 11:01:17AM -0600, Scott Marlowe wrote: Another question, this public schema, in the usual practice way, do you delete it or just leave it there and create your own schema? I leave it in place. IT doesn't hurt anything really. Alternativly, you can revoke all

Re: [GENERAL] Primary Key

2007-11-16 Thread David Fetter
On Fri, Nov 16, 2007 at 12:06:46PM -0800, Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 16 Nov 2007 20:00:29 + Sam Mason [EMAIL PROTECTED] wrote: Normally a primary key would just be a single column. When you start going to that many I'd

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread A . M .
On Nov 16, 2007, at 5:43 PM, Tom Hart wrote: Tom Hart wrote: Peter Eisentraut wrote: Tom Hart wrote: Specifically I'm looking at these two lines isactive and (mb_mail_cd=0 or mb_mail_cd=1) as ismail, ismail and (mb_stat_cd=0 or mb_stat_cd=2) as ispromomail, which appear to use other

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Martijn van Oosterhout
On Fri, Nov 16, 2007 at 05:43:44PM -0500, Tom Hart wrote: I've been doing some googling on sql aliases (my sql knowledge is far from impressive) and it appears that column aliases can be great for displaying different column names in your output. However I was unable to find any information

Re: [GENERAL] view management

2007-11-16 Thread Justin Pasher
Ed L. wrote: On Friday 16 November 2007 2:48 pm, Scott Marlowe wrote: On Nov 16, 2007 3:43 PM, Ed L. [EMAIL PROTECTED] wrote: That looks about as ugly as can be. Ugh. What it appears to boil down to is that views become unusable unless you are willing to invest the effort in a

Re: [GENERAL] view management

2007-11-16 Thread Ed L.
Thanks, Justin. On Friday 16 November 2007 4:38 pm, Justin Pasher wrote: We have a system that has quite a few views to access some of the data (although we purposely tried to avoid views that pulled from other view due to some performance issues), but when we had all of the view

Re: [GENERAL] Primary Key

2007-11-16 Thread Sam Mason
On Fri, Nov 16, 2007 at 04:41:42PM -0500, Merlin Moncure wrote: On Nov 16, 2007 3:21 PM, Sam Mason [EMAIL PROTECTED] wrote: On Fri, Nov 16, 2007 at 12:06:46PM -0800, Joshua D. Drake wrote: When that is needed I do this: create table foo(id serial unique, a text, b text, primary (a,b));

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-16 Thread Reg Me Please
Il Thursday 15 November 2007 14:09:16 Trevor Talbot ha scritto: On 11/15/07, Reg Me Please [EMAIL PROTECTED] wrote: In any case, what'd be the benefit for not allowing variables as LIMIT and OFFSET argument? When you can fully describe the semantics of your example, you'll probably be able

Re: [GENERAL] Chunk Delete

2007-11-16 Thread Abraham, Danny
Say we have a FIFO of 800,000,000 records. No primary key is required - this is only audit information. We do not use it on Oracle too. Based on a condition, 2,000,000 records should be deleted daily. We have a background process that wakes up every X minutes and deletes Y records.

[GENERAL] pg_dump not including custom CAST?

2007-11-16 Thread D. Dante Lorenso
All, I did this in my database: CREATE CAST (VARCHAR AS BYTEA) WITHOUT FUNCTION; But when I use pg_dump to dump the database and use pg_restore to bring it back on a freshly created database, the CAST is the only part of the restore which is missing. I'm using PostgreSQL 8.2.4 for both

Re: [GENERAL] Qeury a boolean column?(using postgresql EJB)

2007-11-16 Thread Michael Glaesemann
On Nov 14, 2007, at 17:05 , dycharles wrote: i have a database in postgresql that have a column boolean, then when i create a query in ejb like this(SELECT e.letsaythisisboolean FROM sample e), now problem is that when i query the database in ejb, it will return all the false value in

Re: [GENERAL] Primary Key

2007-11-16 Thread Greg Smith
On Fri, 16 Nov 2007, Merlin Moncure wrote: the sad fact is that sequences have made developers lazy Nah, developers were lazy long before that. If you ask Larry Wall it's a virtue. I gave up on this argument ten years ago after a long battle with well-known natural key zealot Joe Celko

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Shane Ambler
Tom Hart wrote: Hey guys. I have a long piece of sql that I'm trying to take out of an existing Access db and modify to work with Postgresql. I've started trying to convert it, but I've come across a problem that I don't even know how to describe, let alone google. Here's the function INSERT

[GENERAL] Need help with complicated SQL statement

2007-11-16 Thread Ted Byers
Please consider the following statement (it becomes obvious if you remember the important thing about the table is that it has columns for each of stock_id, price_date, and price). (SELECT * FROM stockprices WHERE stock_id = 1 ORDER BY price_date DESC LIMIT 1) UNION (SELECT * FROM (SELECT * FROM

Re: [GENERAL] Primary Key

2007-11-16 Thread Merlin Moncure
On Nov 16, 2007 9:50 PM, Greg Smith [EMAIL PROTECTED] wrote: On Fri, 16 Nov 2007, Merlin Moncure wrote: the sad fact is that sequences have made developers lazy Nah, developers were lazy long before that. If you ask Larry Wall it's a virtue. well, 'lazy' in the sense that it encourages

Re: [GENERAL] Primary Key

2007-11-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/16/07 20:50, Greg Smith wrote: [snip] He doesn't use that example anymore but still misses the point I tried to make. The ability of the world to invalidate the assumptions that go into natural key assignment are really impressive. I

Re: [GENERAL] pg_dump not including custom CAST?

2007-11-16 Thread Tom Lane
D. Dante Lorenso [EMAIL PROTECTED] writes: I did this in my database: CREATE CAST (VARCHAR AS BYTEA) WITHOUT FUNCTION; I'm using PostgreSQL 8.2.4 for both the dump and restore database. Why doesn't the CAST dump and restore? pg_dump thinks it's a built-in system object.

  1   2   >