Re: [SQL] Query kill

2002-07-11 Thread Bruce Momjian
Rudi Starcevic wrote: > Hello, > > If I write a query that is inefficient or in an eternal loop how > do I stop it without restarting the postmaster ? > > I can see many postmaster processed appearing in the output of the 'ps' > command. > Do I need to stop/kill them all or can I stop just the

[SQL] Query kill

2002-07-11 Thread Rudi Starcevic
Hello, If I write a query that is inefficient or in an eternal loop how do I stop it without restarting the postmaster ? I can see many postmaster processed appearing in the output of the 'ps' command. Do I need to stop/kill them all or can I stop just the query I want ? Thanks heaps Rudi. -

Re: [SQL] PostgreSQL - contrib/xml

2002-07-11 Thread Christopher Kings-Lynne
The usual way to install a contrib is to run configure with whatever args you want in the root postgres source dir. Then: cd contrib/xml gmake all gmake install Sort of thing. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Rudi Starcevic

Re: [SQL] Please, HELP! Why is the query plan so wrong???

2002-07-11 Thread Jie Liang
I believe that SQL will use the index of join 'key' when you join the tables if have any, in your query the (a,c) is the join key but d is not. Jie Liang -Original Message- From: Dmitry Tkach [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 3:51 PM To: [EMAIL PROTECTED]; [EMAIL

[SQL] PostgreSQL - contrib/xml

2002-07-11 Thread Rudi Starcevic
Hello :-) I'm not sure how to compile in the contrib/xml into Posgtresql. I do compile Postgres on my Debian box but I'm not sure about the flags etc to also compile the contrib stuff. I know the standard compile commands / options so in order to get the xml compiled can you tell me what to add

[SQL] Please, HELP! Why is the query plan so wrong???

2002-07-11 Thread Dmitry Tkach
Hi, everybody! Here is the problem: test=# create table fb (a int, b int, c datetime); CREATE test=# create table fbr (a int, c datetime, d int); CREATE test=# create unique index fb_idx on fb(b); CREATE test=# create index fbr_idx on fbr(a,c) where d is null; CREATE test=# set enable_seqsca

Re: [SQL] SQL problem with aggregate functions.

2002-07-11 Thread Loyd Goodbar
I would suggest something like select sum(case when f1 = 'D' then 1 else 0 end) as D_COUNT, sum(case when f1 = 'R' then 1 else 0 end) as R_COUNT, sum(case when f1 = 'X' then 1 else 0 end) as X_COUNT from tab where f1 in ('D','R','X') Not sure what the "field group" represents. HTH, Loyd On Thu

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
What parameter I should change in order to make postmaster taking CPU as much as possible? Maybe I should ask: how can I make big tables equijoin faster? I have a serveral tables that contain more 2.5 million records, I need to equijoin those tables often. Thanks! Jie Liang -

Re: [SQL] [HACKERS] please help on query

2002-07-11 Thread Manfred Koizar
On Thu, 11 Jul 2002 19:40:46 +0200, "Luis Alberto Amigo Navarro" <[EMAIL PROTECTED]> wrote: >I've tried [reformatted to fit on one page] | SELECT supplier.name, supplier.address | FROM supplier, nation, lineitem You already found out that you do not need lineitem here. | WHERE EXISTS( | SELECT

Re: [SQL] list of tables ? -update to question ...

2002-07-11 Thread Jan Wieck
Steve Brett wrote: > > sorry ... i didn't make myself clear ... > > i have of course come across \dt before ... > > what i meant was via sql as in 'select tablelist from perhaps ?>' What about: SELECT * FROM pg_tables; Jan -- #

Re: [SQL] [HACKERS] please help on query

2002-07-11 Thread Manfred Koizar
[moving to pgsql-sql] On Thu, 11 Jul 2002 17:22:14 +0200, "Luis Alberto Amigo Navarro" <[EMAIL PROTECTED]> wrote: >I can't improve performance on this query: > >SELECT > supplier.name, > supplier.address >FROM > supplier, > nation >WHERE > supplier.suppkey IN( > SELECT > partsupp.suppkey > FRO

Re: [SQL] how to inherits the references...

2002-07-11 Thread Stephan Szabo
On Thu, 11 Jul 2002, [iso-8859-1] frederik nietzsche wrote: > as if the sigles where not in the "sigles" table, but > it's there! > it's probably because of the way in which psql threats > the inheritance. > my question is (finally): is there some workaround for > this?? or: am I making some mi

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
On this point, I'd like to ask: 1. where I can download this new version? 2. does pg_restore --index=aa --dbname=test /bjm/x works also??? Because pg_restore --table=mytable --dbname=mydb mydumpfile doesn't work! I got same error msg. Jie Liang -Original Message- From: Bruce Momjian [

Re: [SQL] XML to Postgres conversion

2002-07-11 Thread Rudi Starcevic
Hi, Hey wow the contrib/xml looks most impresive. I'm so stoopid I've being looking around for xml solutions with even knowing about the contrib/xml in my beloved postgreSQL source. Thanks for the tip. Cheers Rudi. > Look at contrib/xml at > http://developer.postgresql.org/cvsweb.cgi/pgsql/co

[SQL] how to inherits the references...

2002-07-11 Thread frederik nietzsche
hi all, I've created some table with the inharitance, something like: CREATE TABLE sigles( sigle varchar(255) PRIMARY KEY ); CREATE TABLE cars( UNIQUE (sigle) )INHERITS (sigles); CREATE TABLE used_cars( old_owner text, kmtext, mode

Re: [SQL] XML to Postgres conversion

2002-07-11 Thread George.T.Essig
Look at contrib/xml at http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/xml/. I never used this, but it might be useful. George Essig > Hello. > > I am trying to figure out how to import xml documents into a postgres > database. I am running PostgreSql 7.1.3 on Red Hat 7.2 at the momen

Re: [SQL] list of tables ?

2002-07-11 Thread Steve Brett
thanks. Steve > -Original Message- > From: Achilleus Mantzios [mailto:[EMAIL PROTECTED]] > Sent: 11 July 2002 15:10 > To: Steve Brett > Cc: Pgsql-Sql (E-mail) > Subject: Re: [SQL] list of tables ? > > > On Thu, 11 Jul 2002, Steve Brett wrote: > > > can anyone point me in the right dir

Re: [SQL] list of tables ? -update to question ...

2002-07-11 Thread Steve Brett
sorry ... i didn't make myself clear ... i have of course come across \dt before ... what i meant was via sql as in 'select tablelist from ' Steve > -Original Message- > From: Stephane Schildknecht [mailto:[EMAIL PROTECTED]] > Sent: 11 July 2002 15:06 > To: Steve Brett > Subject: Re:

Re: [SQL] list of tables ?

2002-07-11 Thread Ian Barwick
On Thursday 11 July 2002 16:00, Steve Brett wrote: > can anyone point me in the right direction ? > > i need to list all the tables in a database. > > i've looked at pgadmin_tables which is empty and pga_schema whihc contains > a sinlge row i don't want to parse ... > > is there an easier way t ge

Re: [SQL] list of tables ?

2002-07-11 Thread Achilleus Mantzios
On Thu, 11 Jul 2002, Steve Brett wrote: > can anyone point me in the right direction ? > > i need to list all the tables in a database. > > i've looked at pgadmin_tables which is empty and pga_schema whihc contains a > sinlge row i don't want to parse ... > > is there an easier way t get a lis

[SQL] list of tables ?

2002-07-11 Thread Steve Brett
can anyone point me in the right direction ? i need to list all the tables in a database. i've looked at pgadmin_tables which is empty and pga_schema whihc contains a sinlge row i don't want to parse ... is there an easier way t get a list of tables ? i'm on 7.2 ta, Steve Brett -

[SQL] XML to Postgres conversion

2002-07-11 Thread Nathan Hill
Hello. I am trying to figure out how to import xml documents into a postgres database. I am running PostgreSql 7.1.3 on Red Hat 7.2 at the moment. I have several dynamic xml documents that I want imported into the database on a regular basis. From my research so far, I know that there is middl

Re: [SQL] SQL problem with aggregate functions.

2002-07-11 Thread Christoph Haller
> > I've got a table in which there is a field that can have one amongst 3 > possible values : D, R, X. Is it possible to get in one query the count of > this different values.Please, note that I don't want to have a querry like > this : > "select count (*) from tab group by f1;", cause i want