Re: [GENERAL] [NOVICE] alter table table add column

2007-07-30 Thread Ronald Rojas
Oh yes you have a good point. But then I will still have to test insert and update on views. Thanks a lot michael! On Tue, 2007-07-31 at 00:56 -0500, Michael Glaesemann wrote: > On Jul 31, 2007, at 0:23 , Ronald Rojas wrote: > > > Yes I know that procedure but I would like to insert in between

Re: [GENERAL] plperl syntax highlighting for vi

2007-07-30 Thread David Fetter
On Mon, Jul 30, 2007 at 07:58:14PM -0500, Decibel! wrote: > On Jul 30, 2007, at 3:44 PM, Geoffrey wrote: > >Has anyone taken a stab at adding plperl syntax highlighting for > >vi? > > Hrm, not likely. David Fetter might be able to point you at > something. > > If you come up with something please

Re: [GENERAL] [NOVICE] alter table table add column

2007-07-30 Thread Michael Glaesemann
On Jul 31, 2007, at 0:23 , Ronald Rojas wrote: Yes I know that procedure but I would like to insert in between because I have at third party software that will call the said schema and one of its dependencies with the mapping is it should have the correct order with what the receiving end

Re: [GENERAL] [NOVICE] alter table table add column

2007-07-30 Thread Ronald Rojas
Hi, Sorry for doing the multiple mailing list recipient. Yes I know that procedure but I would like to insert in between because I have at third party software that will call the said schema and one of its dependencies with the mapping is it should have the correct order with what the receiving en

Re: [GENERAL] The leanest, meanest Windows installer possible

2007-07-30 Thread Tony Caduto
Mitchell Vincent wrote: I've been using PG for years and years but bringing it to the Win32 desktop presents some deployment challenges. Since this software will be downloaded I am looking for the smallest possible installer that provides the functionality I'm looking for. Hi Mitchell, I c

Re: [GENERAL] ascii() for utf8

2007-07-30 Thread Decibel!
Moving to -hackers. On Jul 27, 2007, at 1:22 PM, Stuart wrote: Does Postgresql have a function like ascii() that will return the unicode codepoint value for a utf8 character? (And symmetrically same for question chr() of course). I didn't find anything in the docs so I think the answer is no wh

Re: [GENERAL] Question about Postgres

2007-07-30 Thread Decibel!
Moving to -general. On Jul 26, 2007, at 12:51 PM, NetComrade wrote: I apologize for cross-posting, but I need some help w/o too many advices RTFM :). After Oracle and MySQL, this becomes the third product that I need to learn to some degree, and I need a few links which would provide a 'quick tu

Re: [GENERAL] plperl syntax highlighting for vi

2007-07-30 Thread Decibel!
On Jul 30, 2007, at 3:44 PM, Geoffrey wrote: Has anyone taken a stab at adding plperl syntax highlighting for vi? Hrm, not likely. David Fetter might be able to point you at something. If you come up with something please post it on pgFoundry so that others can find it! :) -- Decibel!, aka

Re: [GENERAL] PostgreSQL install problem

2007-07-30 Thread Decibel!
To: [EMAIL PROTECTED] Uh, how is email sent to "[EMAIL PROTECTED]" making it to this mailing list? I seriously hope they haven't just decided to bounce all their support requests to this community... On Jul 27, 2007, at 6:21 PM, Bodó István wrote: I have a problem . I try install Pos

Re: [pgsql-advocacy] [GENERAL] PostgreSQL, PGDAY, PGParty and OSCON 2007 Rocked!

2007-07-30 Thread Robert Treat
On Monday 30 July 2007 23:39, Alvaro Herrera wrote: > Joshua D. Drake wrote: > > http://www.commandprompt.com/images/oscon_2007.png > > > Left to right: Michael from UGA > (surely everyone knows what UGA is, right?), Josh Berkus, Jim Nasby, > Josh Drake, David Fetter, Robert Treat. > Michael is M

Re: [GENERAL] How do I create a database if I can't connect to it?

2007-07-30 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > On 7/27/07, David Fetter <[EMAIL PROTECTED]> wrote: >>> For a short description, I'll just show the sequence of commands I'm trying >>> to execute: >> >> This looks like a mistake. Unless you plan to develop the PostgreSQL >> code itself, you should

Re: [GENERAL] [NOVICE] alter table table add column

2007-07-30 Thread Michael Glaesemann
[Please don't post the same question to many lists. Choose one. If you're unsure if it's the correct list for your question, ask if there's a more appropriate one. This question is find for -novice or - general. Thanks.] On Jul 30, 2007, at 23:19 , Ronald Rojas wrote: And, I want to add the

[GENERAL] alter table table add column

2007-07-30 Thread Ronald Rojas
Hi, Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure: Column | Type| Modifiers --+---+--- surname | character varying | lastname | character varying | address | character

Re: [GENERAL] Stored Proc Problem

2007-07-30 Thread Tom Lane
Robert Landrum <[EMAIL PROTECTED]> writes: > I'm writing a stored procedure that will execute as a trigger. > Arguments being passed to the procedure are field names. > My goal is to convert those field names into the field values. However, > I've not been successful. I thought that the follow

Re: [GENERAL] PostgreSQL, PGDAY, PGParty and OSCON 2007 Rocked!

2007-07-30 Thread Alvaro Herrera
Joshua D. Drake wrote: > Joshua D. Drake wrote: >> Richard Broersma Jr wrote: >>> --- "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: >>> Hello, For those who were too square to be there, >>> >>> For us squares, are there any pictures avaliable of this event? >> Yes :)... they are comin

Re: [GENERAL] PostgreSQL, PGDAY, PGParty and OSCON 2007 Rocked!

2007-07-30 Thread Joshua D. Drake
Joshua D. Drake wrote: Richard Broersma Jr wrote: --- "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: Hello, For those who were too square to be there, For us squares, are there any pictures avaliable of this event? Yes :)... they are coming. I hope to have them all this weekend. I call th

Re: [GENERAL] [pgsql-advocacy] European users mailing list

2007-07-30 Thread Joshua D. Drake
Dave Page wrote: This is for the European users group, so is not really intended as a technical list but as a place to discuss events, advocacy and other topics relevant to our work in Europe. If it's not a general list, why did you name it "general"? That will certainly cause confusion. It s

Re: [GENERAL] pg_dump

2007-07-30 Thread Michael Fuhr
On Mon, Jul 30, 2007 at 07:26:45PM -0400, Tom Allison wrote: > pg_dump does not support SSL connections? pg_dump sits atop libpq, which can use SSL if PostgreSQL was built with SSL support. > I have been using pgsql with ssl connections to my database. > But when I tried pg_dump I was hit with th

[GENERAL] pg_dump

2007-07-30 Thread Tom Allison
just checking to be sure. pg_dump does not support SSL connections? I have been using pgsql with ssl connections to my database. But when I tried pg_dump I was hit with the "no ssl" error message. Didn't see an option for it in the RTFM so .. Am I correct in assuming that pg_dump/pg_restore a

Re: [GENERAL] Auto Starting +/or Shutdown on OS X

2007-07-30 Thread Michael Glaesemann
On Jul 30, 2007, at 16:14 , Ralph Smith wrote: I'm using scripts in /Library/StartupItems/PostgreSQL I haven't used a StartupItem for PostgreSQL since launchd was released. I haven't looked too closely at your configuration, but you might consider using a launchd plist instead. Here's one

[GENERAL] Auto Starting +/or Shutdown on OS X

2007-07-30 Thread Ralph Smith
I'm using scripts in /Library/StartupItems/PostgreSQL PostgreSQL starts manually just fine via /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/logfile start PostgreSQL will not start on System restart using files in /Library/StartupItems/PostgreSQL (See below). If I

[GENERAL] Stored Proc Problem

2007-07-30 Thread Robert Landrum
I'm writing a stored procedure that will execute as a trigger. Arguments being passed to the procedure are field names. My goal is to convert those field names into the field values. However, I've not been successful. I thought that the following should have worked. EXECUTE ''field_val := N

[GENERAL] plperl syntax highlighting for vi

2007-07-30 Thread Geoffrey
Has anyone taken a stab at adding plperl syntax highlighting for vi? -- Until later, Geoffrey Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. - Benjamin Franklin ---(end of broadcast)-

Re: [GENERAL] tables not in list

2007-07-30 Thread paddy carroll
put all your tables in a new table (public.tables) select table_name from public.tables where public.tables.table_name not in (select table_name from information_schema.tables where table_catalog='postgres' and table_type='BASE TABLE' and table_schema='public') On 30 Jul 2007, at 20:31,

[GENERAL] tables not in list

2007-07-30 Thread Lee Keel
Hi List, I have a list of table names and I am trying to confirm that they are all in my postgres db. But what I want returned is a list/array of ones that are in my list but not in the db. So for example: CREATE TABLE test ( somecol integer ) WITHOUT OIDS; CREATE TABLE bar ( barcol inte

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Cultural Sublimation
Hi, > If you have no index on comments.comment_author, then a seqscan will be > required for your join between comments and users. Similarly, if you > have no index on comments.comment_story, then any query against comments > that uses that column as part of a predicate will require a seqscan o

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Rodrigo De León
On Jul 30, 12:01 pm, [EMAIL PROTECTED] (Cultural Sublimation) wrote: > Hash Join (cost=28.50..21889.09 rows=988 width=14) (actual > time=3.674..1144.779 rows=1000 loops=1) >Hash Cond: ((comments.comment_author)::integer = (users.user_id)::integer) >-> Seq Scan on comments (cost=0.00..218

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Jon Sime
Cultural Sublimation wrote: SELECT comments.comment_id, users.user_name FROM comments, users WHERE comments.comment_story = 100 AND comments.comment_author = users.user_id; The problem is that this query takes a *very* long time. With the said 1,000,000 comments, it needs at least 1100ms on my

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Nis Jørgensen
Cultural Sublimation skrev: > Hi, > > I'm fairly new with Postgresql, so I am not sure if the performance > problems I'm having are due to poorly constructed queries/indices, > or if I bumped into more fundamental problems requiring a design of > my database structure. That's why I'm requesting y

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Richard Huxton
Cultural Sublimation wrote: CREATE TABLE users ( user_id int UNIQUE NOT NULL, user_name text, PRIMARY KEY (user_id) ); CREATE TABLE stories ( story_idint UNIQUE NOT NULL, story_title

Re: [GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Bryan Murphy
First question... did you create the appropriate indexes on the appropriate columns for these tables? Foreign keys do not implicitly create indexes in postgres. Bryan On 7/30/07, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm fairly new with Postgresql, so I am not sure if the p

[GENERAL] Optimising SELECT on a table with one million rows

2007-07-30 Thread Cultural Sublimation
Hi, I'm fairly new with Postgresql, so I am not sure if the performance problems I'm having are due to poorly constructed queries/indices, or if I bumped into more fundamental problems requiring a design of my database structure. That's why I'm requesting your help. Here's the situation: I have

Re: [GENERAL] Core reported from vaccum function.

2007-07-30 Thread Alvaro Herrera
Mavinakuli, Prasanna (STSD) wrote: > > Hello Alvaro, > > Thanks for your reply. > > We could see > "Fix potential-data-corruption bug in how VACUUM FULL handles UPDATE > chains (Tom, Pavan Deolasee) " in 7.4.17 release notes. > > Could you please elaborate more on the above problem.Meaning wh

Re: [GENERAL] Data on NAS / NFS

2007-07-30 Thread Hannes Dorbath
On 28.07.2007 06:48, Jean-Denis Girard wrote: The NAS would be from LaCie, using 4 disks (Raid5 + spare) (http://www.lacie.com/fr/products/product.htm?pid=10876), mounted via NFS from a Linux server running Postgresql . Sorry, but that sounds like a sick setup.. 1.) RAID 5 is a bad choice for

Re: [GENERAL] [pgsql-advocacy] European users mailing list

2007-07-30 Thread Luca Ferrari
On Monday 30 July 2007 Robert Treat's cat, walking on the keyboard, wrote: > *shrug* I wasn't there either, but seems all the emails I have seen > reffered to it as the "European PostgreSQL Users Group", so I expected it > to look more like other users groups, ie. [EMAIL PROTECTED] This mailing l

Re: [GENERAL] [pgsql-advocacy] European users mailing list

2007-07-30 Thread Stefan Kaltenbrunner
Robert Treat wrote: > On Monday 30 July 2007 03:47, Dave Page wrote: >> Joshua D. Drake wrote: >>> Peter Eisentraut wrote: Dave Page wrote: > As discussed at the first meeting of what will become the European > PostgreSQL Users Group after pgDay in Prato, we now have a mailing > li

Re: [GENERAL] Data on NAS / NFS

2007-07-30 Thread Joseph Shraibman
I've had trouble with NFS files on nfs filesystems disappearing for a second and reappearing. I had to add a retry loop with a delay in my code that does file reading. I wouldn't try running a production level postgres over nfs. ---(end of broadcast)--

Re: [GENERAL] [pgsql-advocacy] European users mailing list

2007-07-30 Thread Robert Treat
On Monday 30 July 2007 03:47, Dave Page wrote: > Joshua D. Drake wrote: > > Peter Eisentraut wrote: > >> Dave Page wrote: > >>> As discussed at the first meeting of what will become the European > >>> PostgreSQL Users Group after pgDay in Prato, we now have a mailing > >>> list setup at [EMAIL PROT

Re: [GENERAL] PQntuples return type

2007-07-30 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > So, my doubt is: if the return type is int instead of unsigned int, > is this function testable for negative return values? A quick glance at the code in fe-exec.c and fe-protocol3.c shows that the underlying variable starts at 0 as an int

Re: [GENERAL] Slow query but can't see whats wrong

2007-07-30 Thread Henrik Zagerholm
24 jul 2007 kl. 16:10 skrev Tom Lane: Henrik Zagerholm <[EMAIL PROTECTED]> writes: I'm using pgsql 8.2.4 and I have this query which is sooo slow but I can seem to figure out why. Seems the core of the problem is the misestimation here: "-> Inde

Re: [GENERAL] Possible new feature

2007-07-30 Thread Alexander Staubo
On 7/30/07, mgould <[EMAIL PROTECTED]> wrote: > I'm in the process of moving to PostGres from iAnywhere's SQL Anywhere v 10. > One of the neat features from ASA 10 is the ability to create "proxy > tables" These tables can be local or remote. Check out the dblink contrib module that comes with P

Re: [GENERAL] [SQL] Tunning PostgreSQL performance for views on Windows

2007-07-30 Thread Lewis Cunningham
How big are the underlying tables? If they are large, are you partitioning? Since the values only change daily, if the end result is a reasonable size, have you considered using a CTAS rather than views? LewisC --- Ranieri Mazili <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a BI and

[GENERAL] Possible new feature

2007-07-30 Thread mgould
All, I'm in the process of moving to PostGres from iAnywhere's SQL Anywhere v 10. One of the neat features from ASA 10 is the ability to create "proxy tables" These tables can be local or remote. The purpose of a proxy table is that once create it can be used just like any other table o

Re: [GENERAL] query to match '\N'

2007-07-30 Thread Alban Hertroys
Nis Jørgensen wrote: > Alban Hertroys skrev: > >> Presumably he wanted col2 like E'%N%'. >> But doesn't \N mean NULL, or would the OP be looking for literal '\N' >> strings in his data? Because if he's looking for NULLs it may be better >> to query for col2 IS NULL. > > My guess is that this

Re: [GENERAL] query to match '\N'

2007-07-30 Thread Nis Jørgensen
Alban Hertroys skrev: > Presumably he wanted col2 like E'%N%'. > But doesn't \N mean NULL, or would the OP be looking for literal '\N' > strings in his data? Because if he's looking for NULLs it may be better > to query for col2 IS NULL. My guess is that this string was used to signify NULL i

Re: [GENERAL] query to match '\N'

2007-07-30 Thread Alban Hertroys
Bertram Scharpf wrote: > Hi, > > Am Freitag, 27. Jul 2007, 18:35:21 - schrieb pc: >> I have a table test with columns col1 col2.col2 contains an entry >> '\N' .I want to select all entries which have '\N' in col2.How do i >> do that? >> >> select * from test where col2 like '\N' ; >> select

[GENERAL] PQntuples return type

2007-07-30 Thread Luca Ciciriello
Hi All. My question is simple: can the function PQntuples returns a negative integer? I've found in the PostgreSQL manual the following definition: Returns the number of rows (tuples) in the query result. int PQntuples(const PGresult *res); So, my doubt is: if the return type is int instead of

Re: [GENERAL] query to match '\N'

2007-07-30 Thread Bertram Scharpf
Hi, Am Freitag, 27. Jul 2007, 18:35:21 - schrieb pc: > I have a table test with columns col1 col2.col2 contains an entry > '\N' .I want to select all entries which have '\N' in col2.How do i > do that? > > select * from test where col2 like '\N' ; > select * from test where col2 like '\\N'

Re: [GENERAL] [pgsql-advocacy] European users mailing list

2007-07-30 Thread Dave Page
Joshua D. Drake wrote: > Peter Eisentraut wrote: >> Dave Page wrote: >>> As discussed at the first meeting of what will become the European >>> PostgreSQL Users Group after pgDay in Prato, we now have a mailing >>> list setup at [EMAIL PROTECTED] >>> >>> This is for the European users group, so is