Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread novnov
Right, rel theory is fine, but I work with databases all day long and in the various lists that shows the fields in a table, placing them in some kind of order, other than chron by creation time, is very useful and efficient. It may not matter to the database engine but it matters to the human eng

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Ben
You can group schemas with views, and it guarentees nobody will accidently overwrite somebody else's stuff. Merging a two schemas with identical table structure should also be quite trivial. Of course, if you have a lot of users, this might not work so well On Tue, 7 Aug 2007, Owen Hartnet

Re: [GENERAL] Intelligent Database in postgreSQL

2007-08-07 Thread Decibel!
On Mon, Aug 06, 2007 at 07:37:09PM -0700, Rich Shepard wrote: > On Mon, 6 Aug 2007, Rodrigo Faccioli wrote: > > >I'm a new user's postgreSQL and I have a question: Is possible add > >function of intelligent System like Neural Networks or Fuzzy Logic within > >postgre SGDB? > > Inherently, no. B

Re: [GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Decibel!
On Tue, Aug 07, 2007 at 08:40:47AM -0700, Steve Atkins wrote: > If you have adequate disk space free (enough to hold another > copy of the new table) and the table has an index on it, then > CLUSTER the table. Be advised that there's some MVCC issues with CLUSTER in current versions, but normally

Re: [GENERAL] create table liek view

2007-08-07 Thread Ragnar
On þri, 2007-08-07 at 15:23 +0200, Filip Rembiałkowski wrote: > [EMAIL PROTECTED] create view v as select 1::int; > CREATE VIEW > [EMAIL PROTECTED] select * from v; > int4 > -- > 1 > (1 row) > [EMAIL PROTECTED] create table t ( like v); > ERROR: inherited relation "v" is not a table > >

Re: [GENERAL] array_to_set functions

2007-08-07 Thread Decibel!
On Sun, Aug 05, 2007 at 08:18:08PM +0530, Merlin Moncure wrote: > On 8/3/07, Guy Fraser <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-08-01 at 07:14 +0530, Merlin Moncure wrote: > > > On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > > > > David Fetter and I just came up with these, perhaps others wil

Re: [GENERAL] Tablespace

2007-08-07 Thread Decibel!
On Sun, Aug 05, 2007 at 04:03:10AM -0700, RPK wrote: > > When PGSQL is installed, it creates two default tablespaces, postgres and There is no postgres tablespace, only a database. The other default tablespace is pg_global. > pg_default. When a user creates a new database he is opted to select a

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
At 5:13 PM -0500 8/7/07, Scott Marlowe wrote: On 8/7/07, Owen Hartnett <[EMAIL PROTECTED]> wrote: Here's what I want to do: Checkpoint the database in whatever way is appropriate. Make copies of the database on several laptops for use in the field (in automobiles) to do database changes.

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
At 2:15 PM -0700 8/7/07, Ben wrote: How many users do you have? Have you considered giving each user a schema in which to make their changes? It sounds like you don't really have a multi-master replication issue, which makes things easier. Maybe I'm not understanding the strategy, but I don't

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Scott Marlowe
On 8/7/07, Owen Hartnett <[EMAIL PROTECTED]> wrote: > > Here's what I want to do: > > Checkpoint the database in whatever way is appropriate. > > Make copies of the database on several laptops for use in the field > (in automobiles) to do database changes. Record all the changes made > since the c

Re: [GENERAL] track row / field usage

2007-08-07 Thread brian
John Smith wrote: guys, i want to track just how many times a particular row, field or contained value gets queried / fetched? i guess a trigger like so would do the trick: on query, update value in column even a log and then parsing it would help. but is there a cooler way- some built-in stats c

Re: [GENERAL] List tables in load order

2007-08-07 Thread Kristo Kaiv
On 02.08.2007, at 4:16, Gregory Williamson wrote: I am not sure if this is the appropriate list -- please point me at the correct one if not. I'm trying to create a procedure that would let me retrieve a list of tables and views in a database that will be used to control the order in whi

Re: [GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Ben
How many users do you have? Have you considered giving each user a schema in which to make their changes? It sounds like you don't really have a multi-master replication issue, which makes things easier. On Tue, 7 Aug 2007, Owen Hartnett wrote: Here's what I want to do: Checkpoint the datab

Re: [GENERAL] import content of XLS file into PostgreSQL

2007-08-07 Thread Julio Cesar Sánchez González
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Alain Roger Enviado el: lunes, 06 de agosto de 2007 05:37 a.m. Para: pgsql-general@postgresql.org Asunto: [GENERAL] import content of XLS file into PostgreSQL Hi, I would like to know what should i do to import the content (not

[GENERAL] Take your postgresSql on the road, and live to tell of it.

2007-08-07 Thread Owen Hartnett
Here's what I want to do: Checkpoint the database in whatever way is appropriate. Make copies of the database on several laptops for use in the field (in automobiles) to do database changes. Record all the changes made since the checkpoint as the user makes them. Periodically take all the

[GENERAL] track row / field usage

2007-08-07 Thread John Smith
guys, i want to track just how many times a particular row, field or contained value gets queried / fetched? i guess a trigger like so would do the trick: on query, update value in column even a log and then parsing it would help. but is there a cooler way- some built-in stats counter? just trying

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread Tony Caduto
Gregory Stark wrote: "novnov" <[EMAIL PROTECTED]> writes: Is there any plan to add such a capability to postgres? It's been talked about. I wouldn't be surprised to see it in 8.4 but nobody's said they'll be doing it yet and there are a lot of other more exciting ideas too. From a

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread Gregory Stark
"novnov" <[EMAIL PROTECTED]> writes: > Is there any plan to add such a capability to postgres? It's been talked about. I wouldn't be surprised to see it in 8.4 but nobody's said they'll be doing it yet and there are a lot of other more exciting ideas too. -- Gregory Stark EnterpriseDB

Re: [GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Gregory Stark
"Steve Atkins" <[EMAIL PROTECTED]> writes: > On Aug 7, 2007, at 1:17 AM, Sergei Shelukhin wrote: > >> Or any way to optimize it besides the obvious (maintenace_work_mem & >> max_fsm_pages increases and no workload)? >> Can someone please help with this one? What does the output of "vacuum verbose

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread Josh Trutwin
On Tue, 7 Aug 2007 11:07:39 -0700 (PDT) novnov <[EMAIL PROTECTED]> wrote: > Is there any plan to add such a capability to postgres? Is there > deep seated reason why reordering columns can't be handled without > doing a root canal on the database? Probably because the theory behind the relation

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

2007-08-07 Thread Michael Glaesemann
On Jul 31, 2007, at 18:53 , Ralph Smith wrote: Apologies for the huge post, but it's got everything relevant that I can think of. See below. Ralph, Did you ever get this sorted? I don't have any new ideas, but was wondering if you had figured out a solution. Michael Glaesemann grzm see

Re: [GENERAL] [SQL] Restricting columns by users

2007-08-07 Thread Andrej Ricnik-Bay
On 8/8/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: > Exist something like it for postgresql? I thought that's what views are for > Thanks Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm --

Re: [GENERAL] [SQL] Using function like where clause

2007-08-07 Thread Ragnar
On mán, 2007-08-06 at 16:44 -0300, Ranieri Mazili wrote: > 1) Can I use a function that will return a string in a where clause like > bellow? > > select * > from table > where my_function_making_where() > and another_field = 'another_think' you could have your function return a boolean

[GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread novnov
One of the few problems I have with postgres is that one is stuck with columns ordered by time of creation, unless one resorts to dropping the table and rebuilding from ddl. If you have data and a bunch of contraints, it's not simple. It's not a critical capability either, but reordering columns i

Re: [GENERAL] truncate transaction log

2007-08-07 Thread Simon Riggs
On Sun, 2007-08-05 at 03:45 -0700, Sergei Shelukhin wrote: > Is there any way to truncate WAL log in postgres? > We want to use full-backup strategy where we stop the server and copy > the data directory, however WAL log is taking dozens gigabytes of > spaces. > Is there any way to remove it while

Re: [GENERAL] finding reusable ids

2007-08-07 Thread Michael Glaesemann
[Please don't top post as it makes the discussion more difficult to follow.] On Aug 7, 2007, at 9:05 , Kenji Morishige wrote: On Tue, Aug 07, 2007 at 12:23:00PM +0200, Nis Jørgensen wrote: This doesn't solve your problem, but might simplify the query to find a new id - something like th

Re: [GENERAL] clustering failover... ala Oracle Parallel server

2007-08-07 Thread Alexander Staubo
On 8/4/07, hanasaki <[EMAIL PROTECTED]> wrote: > clustering failover... ala Oracle Parallel server Note that OPS is now called RAC (see http://orafaq.com/faq/what_is_rac_ops). > How can the server be setup in a cluster for load-balancing and failover > like perhaps OPS? As I understand it, RAC i

Re: [GENERAL] pg_dump of only the structure from a client such as ruby

2007-08-07 Thread Mason Hale
If you haven't seen it already, there is a rails plugin that adds support for foreign-key dependencies (among other things) to the migration domain specific language (DSL): http://www.redhillonrails.org/#foreign_key_migrations Another useful plug-in is "Transactional Migrations" which automatical

Re: [GENERAL] How do I connect postgres table structures and view structures to an existing svn repository?

2007-08-07 Thread Vivek Khera
On Aug 1, 2007, at 10:56 AM, Richard Huxton wrote: You could write a small cron-script that dumped the schema once every 5 minutes so it could be picked up by svn. I think most people have a separate collection of schema-creation/ update scripts that they keep under version control. All cha

Re: [GENERAL] truncate transaction log

2007-08-07 Thread Scott Marlowe
On 8/5/07, Sergei Shelukhin <[EMAIL PROTECTED]> wrote: > Hi. > > Is there any way to truncate WAL log in postgres? > We want to use full-backup strategy where we stop the server and copy > the data directory, however WAL log is taking dozens gigabytes of > spaces. > Is there any way to remove it wh

Re: [GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Steve Atkins
On Aug 7, 2007, at 1:17 AM, Sergei Shelukhin wrote: Ok here's the update after ~30 hours we have killed vacuum full and did vacuum on the tables we freed. However, VACUUM hasn't freed any space at all 0_o We want to launch vacuum full on per-table basis but we can't have any more downtime right

[GENERAL] Unsubscribe

2007-08-07 Thread Matt Starr
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Merlin Moncure [EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 11:14 PM To: [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Move database from Solaris to Windows On 8/2/07

[GENERAL] clustering failover... ala Oracle Parallel server

2007-08-07 Thread hanasaki
clustering failover... ala Oracle Parallel server How can the server be setup in a cluster for load-balancing and failover like perhaps OPS? How does the Postges solution compare to an Oracle? MSSQL? MySQL solution? Thank! ---(end of broadcast)---

Re: [GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Sergei Shelukhin
Ok here's the update after ~30 hours we have killed vacuum full and did vacuum on the tables we freed. However, VACUUM hasn't freed any space at all 0_o We want to launch vacuum full on per-table basis but we can't have any more downtime right now so we will launch it at night today. The original

Re: [GENERAL] List tables in reverse dependancy order

2007-08-07 Thread Gregory Williamson
Thanks ... I was afraid it would as messy as it is; unfortunately Oracle seems to have a way to gather at least some of this in one (ugly) SQL command and I was hoping for some equivalent trick. Greg W. (apologies for top-posting -- limited mail reader) -Original Message- From: Tom Lane

[GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Sergei Shelukhin
Hi. We have archived and removed majority of data from a database, the main impact was on 4 tables, which lost several million rows (3 tables) and several dozen million rows (one table). Naturally we decided to execute VACUUM FULL on the database to reclaim all the space; it keeps running for 22 h

[GENERAL] Using function like where clause

2007-08-07 Thread Ranieri Mazili
Hello, I have 2 questions. 1) Can I use a function that will return a string in a where clause like bellow? select * from table where my_function_making_where() and another_field = 'another_think' 2) Can I use a function that will return a string to return the list of columns that I

[GENERAL] List tables in load order

2007-08-07 Thread Gregory Williamson
I am not sure if this is the appropriate list -- please point me at the correct one if not. I'm trying to create a procedure that would let me retrieve a list of tables and views in a database that will be used to control the order in which lookup data is created/loaded. So, much simplified, if

[GENERAL] truncate transaction log

2007-08-07 Thread Sergei Shelukhin
Hi. Is there any way to truncate WAL log in postgres? We want to use full-backup strategy where we stop the server and copy the data directory, however WAL log is taking dozens gigabytes of spaces. Is there any way to remove it while keeping the database operational/ restore-able by copying it bac

Re: [GENERAL] how to detect the backup database every day

2007-08-07 Thread brian
Richard Huxton wrote: [EMAIL PROTECTED] wrote: Hello all I use a crontab job to backup and restore my database every midnight every day (using pg_dump and restore...) My cron job run well for a while. However, today I discovered that my database was not restored for one month. I also fix t

Re: [GENERAL] how to detect the backup database every day

2007-08-07 Thread Scott Marlowe
On 8/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello all > > I use a crontab job to backup and restore my database every midnight every > day (using pg_dump and restore...) Backup from one machine, restore to another, right? > My cron job run well for a while. However, today I discover

Re: [GENERAL] finding reusable ids

2007-08-07 Thread Kenji Morishige
Actually, I already have a resource table that stores the uid of the item in question. The checkout table does double duty as a history mechanism and a check-out mechanism. I think you are on the right track, I should seperate these two tasks and possibly create another table. The actual design

Re: [GENERAL] Removing a schema

2007-08-07 Thread Tom Lane
Naz Gassiep <[EMAIL PROTECTED]> writes: > I'm trying to remove a schema and move all the tables to another schema. > I've manually run alter table on every table to move them, however all > the foreign keys still reference the old schema, What? It works fine for me: regression=# create schema

[GENERAL] Restricting columns by users

2007-08-07 Thread Ranieri Mazili
Hello, I'm looking for a method to restrict columns by users on postgresql, searching in google I found what I want, but in mysql, below I reproduce the paragraph that shows what I exactly want: "MySQL can also restrict access on the table level and even on the column level. What this means i

[GENERAL] create table liek view

2007-08-07 Thread Filip Rembiałkowski
[EMAIL PROTECTED] create view v as select 1::int; CREATE VIEW [EMAIL PROTECTED] select * from v; int4 -- 1 (1 row) [EMAIL PROTECTED] create table t ( like v); ERROR: inherited relation "v" is not a table Why? Is there any logical reason for this? View is just a table with some rule ON

[GENERAL] Having trouble building 64-bit pgsql 7.4.17 on HPUX ia64

2007-08-07 Thread Rajaram J
Hi I'm having trouble building 64-bit pgsql 7.4.17 on the latest release of HP-UX 11.23 on ia64. Here's my compiler: cc: HP C/aC++ B3910B A.06.15 [May 16 2007] Here's my error: /opt/ansic/bin/cc -Ae +O2 -L../../src/port -Wl,+nodefaultrpath -L/usr/lib -L/opt/openssl/lib -Wl,+b -Wl,/opt/rajara

Re: [GENERAL] how to detect the backup database every day

2007-08-07 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hello all I use a crontab job to backup and restore my database every midnight every day (using pg_dump and restore...) My cron job run well for a while. However, today I discovered that my database was not restored for one month. I also fix the problem as there is cor

Re: [GENERAL] backend process terminates

2007-08-07 Thread Geoffrey
Tom Lane wrote: Geoffrey Myers <[EMAIL PROTECTED]> writes: The output from the gdb batch process may be found here: http://www.serioustechnology.com/gdbbatch.txt gdb isn't telling you the whole truth, evidently --- how'd control get from line 781 to 912 with nothing in between? Recompiling th

Re: [GENERAL] Removing a schema

2007-08-07 Thread Nis Jørgensen
Naz Gassiep skrev: > I'm trying to remove a schema and move all the tables to another schema. > I've manually run alter table on every table to move them, however all > the foreign keys still reference the old schema, and there are too many > to do by hand. > > Is there an easy way to update one o

Re: [GENERAL] finding reusable ids

2007-08-07 Thread Nis Jørgensen
Kenji Morishige skrev: > I have a table that creates "check-out" records that stores information when > a particular resource is being utilized. I want to maintain a friendly > shortened ID so people can reference these check outs. > > At any given time, there should not be more than 99 or so

[GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-07 Thread cluster
I have some questions related to tsearch2: 1) Is ...WHERE rank(myTsVector, myTsQuery) > 0 ... just as fast as ...WHERE myTsVector @@ myTsQuery... ? 2)) I will use plainto_tsquery() to parse search keys entered by a website user to a tsquery. However, if only some of the entered keywords