Re: [GENERAL] help with query...

2007-05-28 Thread Tom Lane
marcelo Cortez [EMAIL PROTECTED] writes: I am confused , way planer it does not use the partial index? query: SELECT cliente_base.* FROM cliente_base WHERE (cliente_base.inst_class_ = 'Cliente' ) ORDER BY cliente_base.nombre ASC Because it thinks the seqscan is cheaper. It

Re: [GENERAL] Help tracking down error in postgres log

2007-05-03 Thread Tom Lane
William Garrison [EMAIL PROTECTED] writes: Can I get postgres to log the actualy command or stored procthat caused the problem? Set log_min_error_statement = error. regards, tom lane ---(end of broadcast)--- TIP 3: Have

Re: [GENERAL] Help debugging a hung postgresql client connection

2007-04-23 Thread Tom Lane
Venkatraju T.V. [EMAIL PROTECTED] writes: The backtrace for the postgresql backend process at that time: (gdb) bt #0 0x00321e6cc5e5 in recv () from /lib64/libc.so.6 #1 0x005004f6 in secure_read (port=0xa0e0f0, ptr=0x7dc8c0, len=8192) at /usr/include/bits/socket2.h:35 #2

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Tom Lane wrote: Nico Sabbi [EMAIL PROTECTED] writes: To begin with I followed the example of the docs: in the recovery.conf file of the slave instance I set restore_command = 'cp -av /var/lib/pgsql/data/pg_xlog/%f %p' Hm, it looks like you are trying to copy xlog

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Merlin Moncure
On 4/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: Is there any parameter that I have to pass to the second server to keep on requesting WALs? I still don't understand what instructs the server to continously request the master's logs. google pg_standby. I've set it up and it works. merlin

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: On 4/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: Is there any parameter that I have to pass to the second server to keep on requesting WALs? I still don't understand what instructs the server to continously request the master's logs. google pg_standby. I've set it up

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Merlin Moncure
On 4/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: Merlin Moncure wrote: On 4/16/07, Nico Sabbi [EMAIL PROTECTED] wrote: Is there any parameter that I have to pass to the second server to keep on requesting WALs? I still don't understand what instructs the server to continously request the

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize that switch - but I didn't

Re: [GENERAL] Help setting up warm standby replication

2007-04-16 Thread Nico Sabbi
Nico Sabbi wrote: Merlin Moncure wrote: try link mode, not copy mode (-l). make sure you read about the -k switch. merlin replaced -c with -l, but the result was the same. I assume that with -k you mean the socket dir for postgres - since pg_standby doesn't seek to recognize that

Re: [GENERAL] Help setting up warm standby replication

2007-04-14 Thread Tom Lane
Nico Sabbi [EMAIL PROTECTED] writes: To begin with I followed the example of the docs: in the recovery.conf file of the slave instance I set restore_command = 'cp -av /var/lib/pgsql/data/pg_xlog/%f %p' Hm, it looks like you are trying to copy xlog segments straight from the pg_xlog

Re: [GENERAL] Help!! Crash recovery

2007-04-06 Thread Bill Moran
In response to Jaime Silvela [EMAIL PROTECTED]: I know you've probably discussed this in many places, but I have a crash right now I need to recover from, and I'm not finding documentation that fast. Where should I go? Here are the details on starting, after a kill -9 of a process

Re: [GENERAL] help required regarding queryin postgis database from google maps

2007-02-26 Thread Andrew Hammond
On Feb 25, 9:34 am, [EMAIL PROTECTED] (Andrew Dunstan) wrote: Phani Kishore wrote: hi ! i think u people could probably help me i how to query the pgsql/postgis from google maps api to display the markers on the google maps which are stored in the postgis database. Phani Kishore

Re: [GENERAL] Help with an index and the optimizer

2007-02-17 Thread Rob Tester
I am using pg 8.1.4, I have a table with 1.1 million rows of data (see below for table definition). One field state is numeric and has an index. The index is not always picked up when searching the table by state only and I can't figure out why. So: SELECT * FROM STUFF WHERE state=12;

Re: [GENERAL] help and Links using postgreSQL with ASP

2007-02-14 Thread Raymond O'Donnell
Pankaj wrote: Need help if there is any script source or links to provide help how to you PostgreSQL with ASP I just use ODBC and ADO - set up a DSN, and then it's as simple as: set conn = Server.CreateObject(ADODB.Connection) conn.Open dsn=your_dsn;uid=your_user;pwd=your_pwd; set rs

Re: [GENERAL] Help compile pgmemcache against PG 8.2

2007-02-06 Thread Chander Ganesan
Richard Huxton wrote: Hannes Dorbath wrote: http://pgfoundry.org/projects/pgmemcache/ We'd like to use pgmemcache with PG 8.2. The memcached version doesn't matter much (1.2.x is current, 1.1.x would be fine as well). It fails to build against 8.2 with various errors. The project seems

Re: [GENERAL] Help compile pgmemcache against PG 8.2

2007-02-06 Thread Richard Huxton
Chander Ganesan wrote: Richard Huxton wrote: Hannes Dorbath wrote: http://pgfoundry.org/projects/pgmemcache/ We'd like to use pgmemcache with PG 8.2. The memcached version doesn't matter much (1.2.x is current, 1.1.x would be fine as well). It fails to build against 8.2 with various

Re: [GENERAL] Help compile pgmemcache against PG 8.2

2007-02-06 Thread Hannes Dorbath
On 06.02.2007 17:04, Richard Huxton wrote: Chander Ganesan wrote: Richard Huxton wrote: Hannes Dorbath wrote: http://pgfoundry.org/projects/pgmemcache/ We'd like to use pgmemcache with PG 8.2. The memcached version doesn't matter much (1.2.x is current, 1.1.x would be fine as well). It

Re: [GENERAL] Help : Microsoft SQL Server equivalents in PostGreSQL

2007-01-22 Thread dean
Benedict Faria wrote: I need to use a postgreSQL equivalent for Updatetext and ReadText in MS SQL Server. Any pointers on what the PostgreSQL equivalent is? Hi Benedict, I don't see an exact equivalent to MS SQL Server's UpdateText (and ReadText) commands in pgsql or any other PostgreSQL

Re: [GENERAL] help me to solve the problem

2007-01-21 Thread Chris
Firstly always cc the mailing list so others can offer suggestions about the problem. Thobiyas wrote: Sir *Postgresql isn't running on the server.* *yes ** You need to start it before you can restore a database.* *Unable to restart the Postgresql using Restart command What is the command

Re: [GENERAL] Help : Microsoft SQL Server equivalents in PostGreSQL

2007-01-20 Thread Mikael Carneholm
I think you can use the binary string functions (http://www.postgresql.org/docs/8.2/interactive/functions-binarystring.html) to achieve the same as ReadText and UpdateText. /Mikael -Original Message- From: Benedict Faria [mailto:[EMAIL PROTECTED] Sent: den 19 januari 2007 14:02

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-20 Thread Tino Wildenhain
Bruce Momjian schrieb: Sorry, I know of no way to get a status bar that shows how far the an INSERT or COPY has progressed. People have asked for it, but no one has any idea how to implement it. Well but thats aparently not the case here anyway. Fileupload is something different from looking

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-20 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/07 18:21, Bruce Momjian wrote: Sorry, I know of no way to get a status bar that shows how far the an INSERT or COPY has progressed. People have asked for it, but no one has any idea how to implement it. How hard *would* it be to patch

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-20 Thread Bruce Momjian
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/07 18:21, Bruce Momjian wrote: Sorry, I know of no way to get a status bar that shows how far the an INSERT or COPY has progressed. People have asked for it, but no one has any idea how to implement it. How

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-20 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Ron Johnson wrote: How hard *would* it be to patch the \copy code to print out a # every N number of input records? Yea, probably, but considering they probably want a graphic progress bar, the big question is what API would you use to allow flexible

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-20 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/20/07 10:52, Bruce Momjian wrote: Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/07 18:21, Bruce Momjian wrote: Sorry, I know of no way to get a status bar that shows how far the an INSERT or COPY has

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-19 Thread Bruce Momjian
Sorry, I know of no way to get a status bar that shows how far the an INSERT or COPY has progressed. People have asked for it, but no one has any idea how to implement it. --- Benedict Faria wrote: Hello, my customer,

Re: [GENERAL] Help : Microsoft SQL Server equivalents in

2007-01-19 Thread Matthew T. O'Connor
I don't think he's looking for progress information, I think he is looking to be able to insert in chunks, which I don't know much about, but I think the some of the binary types (bytea or blob) support this. Anyone? Bruce Momjian wrote: Sorry, I know of no way to get a status bar that shows

Re: [GENERAL] help me to solve the problem

2007-01-18 Thread Chris
Thobiyas wrote: Dear /Sir I am Attmepting follwoing this problem if I Create Database or retore database i am facing following this problem psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix

Re: [GENERAL] Help compile pgmemcache against PG 8.2

2006-12-19 Thread Richard Huxton
Hannes Dorbath wrote: http://pgfoundry.org/projects/pgmemcache/ We'd like to use pgmemcache with PG 8.2. The memcached version doesn't matter much (1.2.x is current, 1.1.x would be fine as well). It fails to build against 8.2 with various errors. The project seems unmaintained and I failed

Re: [GENERAL] help understanding analyze

2006-12-09 Thread Luca Ferrari
On Saturday 09 December 2006 03:48 Tom Lane's cat, walking on the keyboard, wrote: Well, CLUSTER does not guarantee that the data remains sorted --- as soon as you do any updates it won't be anymore. So the planner can never assume that a plain seqscan delivers correctly sorted output. And

Re: [GENERAL] help understanding analyze

2006-12-09 Thread Martijn van Oosterhout
On Sat, Dec 09, 2006 at 11:35:39AM +0100, Luca Ferrari wrote: And when the cluster is rebuilt? I mean, in theory, a clustered index should be sorted at any point in time, that means I've got much cost for insert/update cause I need to sort again the index when I'm performing the

Re: [GENERAL] help understanding analyze

2006-12-09 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: At a guess your table is not big enough to make an index worthwhile. If your table is only a few pages long, it's just not efficient to lookup an index first. If you post the results of EXPLAIN ANALYZE we can tell you for sure. Actually, it

Re: [GENERAL] help understanding analyze

2006-12-08 Thread Bill Moran
Luca Ferrari [EMAIL PROTECTED] wrote: Hi all, excuse me for this trivial question, but here's my doubt: create table person(varchar id, varchar surname, varchar name) with id primary key. Now, the query: select * from person order by surname,name provide me an explaination that is

Re: [GENERAL] help understanding analyze

2006-12-08 Thread Tom Lane
Luca Ferrari [EMAIL PROTECTED] writes: excuse me for this trivial question, but here's my doubt: create table person(varchar id, varchar surname, varchar name) with id primary key. Now, the query: select * from person order by surname,name provide me an explaination that is sequential scan +

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-06 Thread Vivek Khera
On Dec 5, 2006, at 4:09 PM, Scott Marlowe wrote: I recently tossed 8.1 on my workstation which runs a little reporting application here. I pointed the app from 7.4 to 8.1 and got a visit within about an hour from a user, asking if I'd done anything to my database. Worrying that I'd made some

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-06 Thread Scott Marlowe
On Wed, 2006-12-06 at 10:15, Vivek Khera wrote: On Dec 5, 2006, at 4:09 PM, Scott Marlowe wrote: I recently tossed 8.1 on my workstation which runs a little reporting application here. I pointed the app from 7.4 to 8.1 and got a visit within about an hour from a user, asking if I'd done

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-06 Thread Schwenker, Stephen
[mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 4:09 PM To: Glen Parker Cc: Schwenker, Stephen; pgsql general Subject: Re: [GENERAL] HELP: Urgent, Vacuum problem On Tue, 2006-12-05 at 14:56, Glen Parker wrote: Scott Marlowe wrote: On Mon, 2006-12-04 at 09:56, Schwenker, Stephen wrote

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-06 Thread Martijn van Oosterhout
On Wed, Dec 06, 2006 at 10:45:08AM -0500, Schwenker, Stephen wrote: ... I know it's not the best solution but I couldn't get an answer fast enough because every time I send an email to the list, I get a message saying it was stalled and I have to wait for it to be approved by the moderator.

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Bradley Russell
We had the same problem recently on our data warehouse. Check out the reindex and cluster commands. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schwenker, Stephen Sent: Monday, December 04, 2006 9:56 AM To: pgsql-general@PostgreSQL.org Subject:

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Alvaro Herrera
Schwenker, Stephen wrote: I'm having a major Vacuuming problem. I used to do a full vacuum every morning on my postgres database to clean up empty space on a table but because of it's size, the locking of the database causes my application server to max out the database connections and

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Scott Marlowe
On Mon, 2006-12-04 at 09:56, Schwenker, Stephen wrote: Hello, I'm having a major Vacuuming problem. I used to do a full vacuum every morning on my postgres database to clean up empty space on a table but because of it's size, the locking of the database causes my application server to max

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Tom Lane
Schwenker, Stephen [EMAIL PROTECTED] writes: To fix that problem, I have turned off the full vacuum and are just doing a standard analyze vacuum. Good. No I'm getting very close to running out of space on my disks because the table keeps on growing and the database is not re-using deleted

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread John Sidney-Woollett
To recover disk space, reindex the heavily updated tables. You can do this while the database is in production. Check the REINDEX command. John Schwenker, Stephen wrote: Hello, I'm having a major Vacuuming problem. I used to do a full vacuum every morning on my postgres database to clean

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Scott Marlowe
I'm pretty sure reindexing a table takes out an exclusive lock, which means you might wanna wait til off hours to do one. On Tue, 2006-12-05 at 13:26, John Sidney-Woollett wrote: To recover disk space, reindex the heavily updated tables. You can do this while the database is in production.

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Glen Parker
Scott Marlowe wrote: On Mon, 2006-12-04 at 09:56, Schwenker, Stephen wrote: I'm using version 7.4.2 on solaris. A few points: 4: Look at migrating to 8.1 or even 8.2 (due out real soon now). There have been a lot of advances in pg since 7.4, and the upgrade is pretty painless as long as

Re: [GENERAL] HELP: Urgent, Vacuum problem

2006-12-05 Thread Scott Marlowe
On Tue, 2006-12-05 at 14:56, Glen Parker wrote: Scott Marlowe wrote: On Mon, 2006-12-04 at 09:56, Schwenker, Stephen wrote: I'm using version 7.4.2 on solaris. A few points: 4: Look at migrating to 8.1 or even 8.2 (due out real soon now). There have been a lot of advances in pg

Re: [GENERAL] help needed, PG 8.0.0 ERROR: index is not a btree is solved in 8.0.9

2006-11-14 Thread Martijn van Oosterhout
On Tue, Nov 14, 2006 at 01:58:49PM +0530, surabhi.ahuja wrote: hi I am using Postgres 8.0.0 and we found this issue ERROR: index patient_pkey is not a btree I have been informed that we should shift to Postgres 8.0.9 I beleive you've asked this a few times already. As a rule it always best

Re: [GENERAL] help with a query

2006-11-05 Thread Andreas Kretschmer
Pedro Doria Meunier [EMAIL PROTECTED] schrieb: Hi all! This is most certainly a lame question but perhaps someone is gracious enough to lend me a hand ;-) I have the following setup in a table: The first record which is to be found (ok easy enough :D) with a timestamp meets a

Re: [GENERAL] help with a query

2006-11-05 Thread redhog
If you do not want to amend your table with extra information, this is how you do it: Suppose you have a table create table events ( time timestamp, object int refers objects(id), -- The thing that had its ignition turned on or off at this time ignition boolean, comment varchar ); You can

Re: [GENERAL] Help needed

2006-10-19 Thread Richard Broersma Jr
I want to upgrade a system from 7.3.8 ro 8.1.5 I am new to Psql and looking for handy hints Any known problems or pit-falls ? Anything we need to do in preparation ? The Postgresql manual is a good place to start: http://www.postgresql.org/docs/8.1/interactive/install-upgrading.html

Re: [GENERAL] Help needed

2006-10-19 Thread Casey Duncan
On Oct 19, 2006, at 8:19 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to upgrade a system from 7.3.8 ro 8.1.5 I am new to Psql and looking for handy hints Any known problems or pit-falls ? You'll need to dump the database and reload (pg_dump and pg_restore), 8.1 uses a

Re: [GENERAL] help with sql query

2006-10-18 Thread Albe Laurenz
Richard Broersma Jr wrote: id id_1id_2 date_time 1101 10002006-07-04 11:25:43 I want to find all records have same id_1, but different id_2 and have difference in time less than 5 minutes. In this case this is record 1 and record 3. How can I do this ? I am sure that

Re: [GENERAL] help with sql query

2006-10-17 Thread Richard Broersma Jr
idid_1id_2 date_time 1 101 10002006-07-04 11:25:43 I want to find all records have same id_1, but different id_2 and have difference in time less than 5 minutes. In this case this is record 1 and record 3. How can I do this ? I am sure that this will need some tuning

Re: [GENERAL] Help required

2006-10-10 Thread Jim C. Nasby
And run, do not walk, to the latest version of 7.4.x. Better yet, upgrade to 8.1.4. On Thu, Oct 05, 2006 at 01:04:05AM +0500, Shoaib Mir wrote: Run the following pg_ctl -D data folder path status to see if you have the db server running or not? As these seems to me you dont have the

Re: [GENERAL] Help required

2006-10-05 Thread Matthias . Pitzl
Title: Nachricht Hello Vijay! Not 100% sure but Ubuntu should have the database set up similar to Debian on which it's based. This means, you can start the database via: /etc/init.d/postgresql start This should use the distribution specific startup scripts. Greetings, Matthias

Re: [GENERAL] Help required

2006-10-04 Thread Shoaib Mir
Run the followingpg_ctl -D data folder path statusto see if you have the db server running or not?As these seems to me you dont have the database server running on port 5432.Thanks, ---Shoaib MirEnterpriseDB (www.enterprisedb.com)On 10/3/06, Ravindran Vijaykumar R-AVR025 [EMAIL PROTECTED] wrote:

Re: [GENERAL] Help needed defining timestamp format for input?

2006-08-25 Thread Tom Lane
Brent Wood [EMAIL PROTECTED] writes: I've been given a dataset (from Sybase) which has the timestamps expressed as Jun 26 2002 12:18:56:903PM That's pretty bizarre. My advice is to run a quick perl or sed script over the data and change the (I assume) fractional seconds delimiter to a dot.

Re: [GENERAL] Help.

2006-08-11 Thread Alban Hertroys
[EMAIL PROTECTED] wrote: I'd like to truncate varchar field befor insert and update. Any example of trigger to perform this action? For something as simple as that a RULE using the trim(text) function should work well. If that's what you're looking for. -- Alban Hertroys [EMAIL PROTECTED]

Re: [GENERAL] Help with plpgsql - subst variable value

2006-08-02 Thread Christopher Steffen
*Alexander Bodnar * Try ObjectSeqName TEXT := foobar; EXECUTE 'CREATE SEQUENCE ' || ObjectSeqName || ' start 1 increment 1 maxvalue 2147483647'; Thanks, Chris Steffen ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will

Re: [GENERAL] Help making a plpgsql function?

2006-07-11 Thread Jan Wieck
On 7/5/2006 3:51 PM, Bjørn T Johansen wrote: Yes, but I need to return n fields from one table and n fiels from another, and n fields from yet another table, etc... and return this as some kind of record... How do I to this? I wonder why your problem can't be solved by a simple join. Jan

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Dany De Bontridder
On Wednesday 05 July 2006 16:46, Bjørn T Johansen wrote: I need to make a funtion that take one parameter and then returns a record with x number of fields, collected from x no. of tables, i.e. I need to run several sql statemtents to collect all the needed values from x no. of fields and

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
Yes, but I need to return n fields from one table and n fiels from another, and n fields from yet another table, etc... and return this as some kind of record... How do I to this? BTJ On Wed, 5 Jul 2006 19:13:39 +0200 Dany De Bontridder [EMAIL PROTECTED] wrote: On Wednesday 05 July 2006

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread John DeSoi
On Jul 5, 2006, at 3:51 PM, Bjørn T Johansen wrote: Yes, but I need to return n fields from one table and n fiels from another, and n fields from yet another table, etc... and return this as some kind of record... How do I to this? Create a type. Something like create type my_type as (i1

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
That looks like the features I am looking for... I'll check it out more tomorrow, thx... :) BTJ On Wed, 5 Jul 2006 16:32:10 -0400 John DeSoi [EMAIL PROTECTED] wrote: On Jul 5, 2006, at 3:51 PM, Bjørn T Johansen wrote: Yes, but I need to return n fields from one table and n fiels from

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread Bjørn T Johansen
btw, just one more thing... If I join two or more tables, which type should I use for the into variable (select into t2 *...) where t2 would contain fields from more than one table? I guess using t2 some_table%rowtype won't work when joining tables? BTJ On Wed, 5 Jul 2006 16:32:10 -0400 John

Re: [GENERAL] Help making a plpgsql function?

2006-07-05 Thread John DeSoi
On Jul 5, 2006, at 5:41 PM, Bjørn T Johansen wrote: btw, just one more thing... If I join two or more tables, which type should I use for the into variable (select into t2 *...) where t2 would contain fields from more than one table? I guess using t2 some_table%rowtype won't work when

Re: [GENERAL] Help from Havana

2006-06-22 Thread brian ally
Giraldo Leon wrote: I want to know how to print a database eschema with the information of tables, fields,keys,etc Have a look at PostgreSQL Autodoc http://www.rbt.ca/autodoc/ b ---(end of broadcast)--- TIP 5: don't forget to increase

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread Martijn van Oosterhout
On Tue, Jun 20, 2006 at 09:33:13AM -0400, Geoffrey wrote: We have an unusual problem with some perl code that is processing data via DBD facility. Basically, the code consists of various subroutines that are identified in a hash. The primary script then references the subroutines through

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread Geoffrey
Martijn van Oosterhout wrote: On Tue, Jun 20, 2006 at 09:33:13AM -0400, Geoffrey wrote: We have an unusual problem with some perl code that is processing data via DBD facility. Basically, the code consists of various subroutines that are identified in a hash. The primary script then

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread A.M.
On Tue, June 20, 2006 10:20 am, Geoffrey wrote: We considered that and have verified that we are not closing it. But, the question came up, should we be passing it by reference or value? We are doing the following: my $conn = Pg::connectdb (dbname=$db port=$port); . . my $retVal =

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread Martijn van Oosterhout
Err... On Tue, Jun 20, 2006 at 10:20:19AM -0400, Geoffrey wrote: Martijn van Oosterhout wrote: On Tue, Jun 20, 2006 at 09:33:13AM -0400, Geoffrey wrote: We have an unusual problem with some perl code that is processing data via DBD facility. Basically, the code consists of various

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread Tom Lane
A.M. [EMAIL PROTECTED] writes: You are using a completely outdated interface to postgres. Looking on CPAN, Pg.pm was last updated 04 Apr 2000. Which version of postgresql are you using? It is likely that the old interface blows up when connecting to a postgresql from 2000. It shouldn't ...

Re: [GENERAL] Help requd in writing functions in C and using in Postgres

2006-06-20 Thread Michael Fuhr
On Tue, Jun 20, 2006 at 11:23:33AM -0400, Jasbinder Bali wrote: Can you help me in writing functions in C and the using in Postgres. would like to know some pointers and what all needs to be taken into considerations. Are you writing server-side or client-side code? For server-side see

Re: [GENERAL] Help requd in writing functions in C and using in Postgres

2006-06-20 Thread Jasbinder Bali
Does that mean I can't make a function in C that will have all the database transactions and then would just be included in the Stored Procedure in postgres (though i know there is no concept of stored procs in postgres, its all functions that you have in it). If this is not the case then i

Re: [GENERAL] help with error message from perl Pg

2006-06-20 Thread Bruno Wolff III
On Tue, Jun 20, 2006 at 10:43:32 -0400, A.M. [EMAIL PROTECTED] wrote: You are using a completely outdated interface to postgres. Looking on CPAN, Pg.pm was last updated 04 Apr 2000. Which version of postgresql are you using? It is likely that the old interface blows up when connecting to a

Re: [GENERAL] Help requd in writing functions in C and using in Postgres

2006-06-20 Thread Michael Fuhr
On Tue, Jun 20, 2006 at 02:03:06PM -0400, Jasbinder Bali wrote: Does that mean I can't make a function in C that will have all the database transactions and then would just be included in the Stored Procedure in postgres (though i know there is no concept of stored procs in postgres, its all

Re: [GENERAL] Help speeding up this query - maybe need another index?

2006-06-13 Thread Chris
Pat Maddox wrote: Here's my SQL query. I don't think it's too gigantic, but it is kind of beastly: SELECT COUNT(r) FROM trainer_hand_results r, trainer_scenarios s, trainer_scenario_stats stats WHERE r.user_id=1 AND r.trainer_scenario_id=s.id AND s.id=stats.trainer_scenario_id AND

Re: [GENERAL] Help speeding up this query - maybe need another index?

2006-06-13 Thread Pat Maddox
On 6/13/06, Chris [EMAIL PROTECTED] wrote: Pat Maddox wrote: Here's my SQL query. I don't think it's too gigantic, but it is kind of beastly: SELECT COUNT(r) FROM trainer_hand_results r, trainer_scenarios s, trainer_scenario_stats stats WHERE r.user_id=1 AND r.trainer_scenario_id=s.id AND

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-13 Thread Brent Wood
On Mon, 12 Jun 2006, John Tregea wrote: Hi, I have recently switched to PostgreSQL and had no problem bringing our existing (my)SQL databases and data into the environment. I am now extending the functionality of our databases and want to start storing spatial information. The

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-13 Thread Brent Wood
On Tue, 13 Jun 2006, John Tregea wrote: Hi Brent, I will look at postGIS today. I will try and keep the whole GIS functionality as a separate schema to avoid confusing myself, so a postGIS may be exactly what I am looking for. Ummm... one caution: The lovely side effect, apart from all

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-13 Thread Brent Wood
On Tue, 13 Jun 2006, John Tregea wrote: Thanks Brent, I will be cautious in my approach. The public schema is the place that I wanted to use to store the geometry attributes, so from your points, that sounds like the best place. The other schemas contain controlled (security) information

Re: [GENERAL] Help speeding up this query - maybe need another index?

2006-06-13 Thread Florian G. Pflug
Pat Maddox wrote: Here's my SQL query. I don't think it's too gigantic, but it is kind of beastly: SELECT COUNT(r) FROM trainer_hand_results r, trainer_scenarios s, trainer_scenario_stats stats WHERE r.user_id=1 AND r.trainer_scenario_id=s.id AND s.id=stats.trainer_scenario_id AND

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread Tino Wildenhain
John Tregea schrieb: Hi, I have recently switched to PostgreSQL and had no problem bringing our existing (my)SQL databases and data into the environment. I am now extending the functionality of our databases and want to start storing spatial information. The information is made up of

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread John Tregea
Hi Tino, Thanks, I had just found the contrib directory and the spatial_ref_sys file as well. The database is to manage security assessments in supply chains and will store locations of buildings as well as points that define transportation routes. So the data will not be searched on but

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread Gregory S. Williamson
We have had good success with postGIS for storing various spatial data sets (polygons, points and lines). They can be found at http://postgis.refractions.net/. We store our data in lat/long but postGIS has many different spatial reference systems defined and I would suspect that

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread John Tregea
Hi Brent, I will look at postGIS today. I will try and keep the whole GIS functionality as a separate schema to avoid confusing myself, so a postGIS may be exactly what I am looking for. Thanks and regards John Brent Wood wrote: On Mon, 12 Jun 2006, John Tregea wrote: Hi, I have

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread John Tregea
Thanks Greg, I don't know in practice if I will need the minutes and seconds, as you say degrees with decimal information is probably more accurate. If I store degrees in decimal I will need to convert back and forth though as people will use GPS to enter lat and long into the system. I need

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread John Tregea
Thanks Brent, I will be cautious in my approach. The public schema is the place that I wanted to use to store the geometry attributes, so from your points, that sounds like the best place. The other schemas contain controlled (security) information in proprietary data structures so I that was

Re: [GENERAL] Help with storing spatial (map coordinates) data?

2006-06-12 Thread John Tregea
Hi Brent, Excellent advice, thanks for taking the time with what must be a fairly newbie question in GIS terms. I appreciate your help. Cheers John Brent Wood wrote: On Tue, 13 Jun 2006, John Tregea wrote: Thanks Brent, I will be cautious in my approach. The public schema is the

Re: [GENERAL] help with rules please

2006-06-07 Thread A. Kretschmer
am 07.06.2006, um 13:23:09 +0200 mailte peter pilsl folgendes: I dont succeed with writing my rules proper. I need the following rules: when I INSERT/UPDATE to a table and a certain condition is true then a special field in this data-row should be updated to. I came as far: #

Re: [GENERAL] help with rules please

2006-06-07 Thread Rafal Pietrak
May be this is not a full explanation, but at least a recepiet, that works for me: CREATE TABLE testa (x1 text, x2 text); CREATE VIEW testb AS SELECT * from testa; CREATE RULE r0 AS ON INSERT TO testb DO INSTEAD INSERT INTO testa (x1,x2) VALUES (new.x1,new.x2); CREATE RULE r1 AS ON INSERT TO

Re: [GENERAL] help me on a trigger

2006-06-02 Thread Terry Lee Tucker
On Friday 02 June 2006 02:09 am, Pedro [EMAIL PROTECTED] thus communicated: -- I need to create a trigger that decreases on a stocks table the amount -- that have been inserted on the tooken_from_stock table. -- -- the trigger should be something like: -- -- CREATE TRIGGER triggerdecrease --

Re: [GENERAL] HELP!!!ERROR:operator does not exist:arc+arc

2006-05-23 Thread Jim C. Nasby
On Tue, May 23, 2006 at 12:16:01AM -0700, everest_sun wrote: I have define a type arc,but i do not define the +(arc,arc) operator,instead of +(arc,cstring)when i delete the +(arc,cstring),the pgadmin3 tells me a error: ERROR:operator does not exist:arc+arc Please provide a test case using

Re: [GENERAL] help debugging hung process

2006-05-06 Thread Tom Lane
[EMAIL PROTECTED] writes: I'm having problems with hanging apache processes that seem to be stuck in pqSocketPoll. You sure it's not just waiting for a query? What is the connected database server process doing? regards, tom lane ---(end of

Re: [GENERAL] Help with unpredictable use of indexes on large tables...

2006-04-29 Thread John D. Burger
Tom Lane wrote: Also I'd suggest trying select year from [table] group by year which is capable of using a hash aggregation approach; that will likely beat either of these plans. Just out of curiosity, why doesn't the planner consider the same plan for the OP's original query:

Re: [GENERAL] Help with unpredictable use of indexes on large tables...

2006-04-29 Thread Tom Lane
John D. Burger [EMAIL PROTECTED] writes: Tom Lane wrote: Also I'd suggest trying select year from [table] group by year which is capable of using a hash aggregation approach; that will likely beat either of these plans. Just out of curiosity, why doesn't the planner consider the same plan

Re: [GENERAL] Help with unpredictable use of indexes on large tables...

2006-04-27 Thread Tom Lane
Mike Leahy [EMAIL PROTECTED] writes: ... When I try to get the distinct number of years from these tables, it does a sequential scan to get two unique values from the year column in the *_edu table, but it uses an index scan to get a single unique value from the year column from the *_con

Re: [GENERAL] Help with unpredictable use of indexes on large tables...

2006-04-27 Thread Mike Leahy
Tom, Thanks for the advice. I realize that I have little understanding of index usage in PostgreSQL - I'm doing my best to improve this. Below is another comparison of the 'distinct' and 'group by' queries from the same table with seqscan set to on and off. I does look like the group by works

Re: [GENERAL] help plpgsql, cursors, fetch into

2006-04-19 Thread Tom Lane
Mauricio Mantilla [EMAIL PROTECTED] writes: Hi, I'm having a problem with FETCH INTO, but I can't figure out what it is. That kinda looks like a bug. Which PG version are you using exactly? Could you provide a self-contained test case (ie, a script to create the needed tables and sample data)?

Re: [GENERAL] help plpgsql, cursors, fetch into

2006-04-19 Thread Mauricio Mantilla
: pgsql-general@postgresql.org Sent: Wednesday, April 19, 2006 11:26 AM Subject: Re: [GENERAL] help plpgsql, cursors, fetch into Mauricio Mantilla [EMAIL PROTECTED] writes: Hi, I'm having a problem with FETCH INTO, but I can't figure out what it is. That kinda looks like a bug. Which PG

<    1   2   3   4   5   6   7   8   9   >