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

2002-07-15 Thread Luis Alberto Amigo Navarro
- Original Message - From: "Masaru Sugawara" <[EMAIL PROTECTED]> To: "Luis Alberto Amigo Navarro" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 14, 2002 2:23 PM Subject: Re: [SQL] [HACKERS] please help on query This is the output: Aggregate (cost=0.00..647161.10 rows=

[SQL] sql question:

2002-07-15 Thread Chris Aiello
hi all: I'm trying to figure out SQL to do the following: I have an application that tracks SQL that is being sent to the database, and one of it's features is the ability to identify whether a query is an insert, update, delete, select, select with all rows returned, the query is the first in a

[SQL] line datatype

2002-07-15 Thread Tim Hart
Probably the most succinct explanation would be to copy & paste from the terminal... tjhart=> create table a_line( foo line ); CREATE tjhart=> insert into a_line ( foo ) values( '(0,0), (1,1)' ); ERROR: line not yet implemented tjhart=> select version(); version

Re: [SQL] sql question:

2002-07-15 Thread Ahti Legonkov
Chris Aiello wrote: > hi all: > > I'm trying to figure out SQL to do the following: > I have an application that tracks SQL that is being sent to the database, > and one of it's features is the ability to identify whether a query is an > insert, update, delete, select, select with all rows return

Re: [SQL] Indexes with LIKE

2002-07-15 Thread Julian Scarfe
From: "Stephan Szabo" <[EMAIL PROTECTED]> > You need to have made the database in C locale in order to get index scans > from LIKE. I think that's mentioned in the Localization section of the > admin guide, but I could be remembering that wrong. Thanks very much Stephan. Indeed it's in Admin G

Re: [SQL] line datatype

2002-07-15 Thread Bruce Momjian
Tim Hart wrote: > Probably the most succinct explanation would be to copy & paste from the > terminal... > > tjhart=> create table a_line( foo line ); > CREATE > tjhart=> insert into a_line ( foo ) values( '(0,0), (1,1)' ); > ERROR: line not yet implemented > tjhart=> select version(); >

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
Same problem, did you test: pg_restore --index=aa --dbname=test /bjm/x ?? I didn't make it work, I may miss someting. Thanks! Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 7:51 AM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL P

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

2002-07-15 Thread Masaru Sugawara
On Mon, 15 Jul 2002 09:45:36 +0200 "Luis Alberto Amigo Navarro" <[EMAIL PROTECTED]> wrote: > This is the output: > > Aggregate (cost=0.00..647161.10 rows=600122 width=8) (actual > time=4959.19..347328.83 rows=62 loops=1) > -> Group (cost=0.00..632158.04 rows=6001225 width=8) (actual > time=

[SQL]

2002-07-15 Thread Wallingford, Ted
Hi, Can any of you hackers tell me where postgres looks for pg_hba.conf when it starts up? Thanks, Ted ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so t

Re: [SQL]

2002-07-15 Thread Bruce Momjian
Wallingford, Ted wrote: > Hi, > > Can any of you hackers tell me where postgres looks for pg_hba.conf when it > starts up? In /data. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, |

[SQL] Seeding

2002-07-15 Thread Chad Thompson
Is there any way to automaticly "seed" a number into a list.  For example   create table "temp"( select distinct(full_phone) from lists where client_id =8)   This gives me 100,000 unique records   What i would like to do is, every 2500, insert a specific number like '5552552555'   can this be

[SQL] Indexing UNIONs

2002-07-15 Thread Josh Berkus
Folks, I have two tables which are often browsed together through a UNION view, like: CREATE VIEW two_tables AS SELECT t1.id, t1.name, t1.abbreviation, t1.juris_id FROM t1 UNION ALL SELECT t2.id, t2.name, NULL, t2.juris_id FROM t2; This works fine as a view, since I have made the id's unique be

Re: [SQL] Indexing UNIONs

2002-07-15 Thread Stephan Szabo
On Mon, 15 Jul 2002, Josh Berkus wrote: > Folks, > > I have two tables which are often browsed together through a UNION view, like: > > CREATE VIEW two_tables AS > SELECT t1.id, t1.name, t1.abbreviation, t1.juris_id > FROM t1 > UNION ALL > SELECT t2.id, t2.name, NULL, t2.juris_id > FROM t2; > > T

Re: [SQL] Sorry..

2002-07-15 Thread Josh Berkus
Christopher, > In the bad old days when we couldn't distinguish explicit from implicit > cast functions, I was wary of adding new cast pathways. Too many > implicit casts and you have no type system at all. But in 7.3 there > should be no reason to object to an explicit-only cast from numeric

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Bruce Momjian
I just ran some tests in 7.2.1 and 7.3 and both worked fine. Can I see the exact error it generates? --- Jie Liang wrote: > Same problem, did you test: > pg_restore --index=aa --dbname=test /bjm/x > ?? > I didn't make

Re: [SQL] Seeding

2002-07-15 Thread Peter Eisentraut
Chad Thompson writes: > create table "temp"( > select distinct(full_phone) > >from lists > where client_id =8) > > This gives me 100,000 unique records > > What i would like to do is, every 2500, insert a specific number like '5552552555' The first thing you're going to have to define is what yo

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
su postgres -c "/usr/local/pgsql/bin/pg_restore --table=mytable --dbname=mydb mydumpfile" error msg pg_restore: [archiver] could not open input file: No such file or directory I run it on 7.2.0 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, J

[SQL] how pg_restore long form works?

2002-07-15 Thread Jie Liang
su postgres -c "/usr/local/pgsql/bin/pg_restore --table=mytable --dbname=mydb mydumpfile" error msg pg_restore: [archiver] could not open input file: No such file or directory I run it on 7.2.0 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday,

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Bruce Momjian
Jie Liang wrote: > su postgres -c "/usr/local/pgsql/bin/pg_restore --table=mytable > --dbname=mydb mydumpfile" > error msg > pg_restore: [archiver] could not open input file: No such file or directory > > I run it on 7.2.0 OK, my guess is that the 'su' is moving you to another directory. Try sp

[SQL] pg_restore --flag

2002-07-15 Thread Jie Liang
I tried, I got same error msg. I even run as user postgres or myself, same same. My OS=FreeBSD4.3 DB=PostgreSQL7.2 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 4:25 PM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL PROTECTED]'; '

Re: [SQL] Indexing UNIONs

2002-07-15 Thread Josh Berkus
Stephan, > We had a discussion recently on -general about this. Right now the > planner won't push the conditions down into the arms of the union because > noone's been sure under what conditions the optimization is safe. So, if performance is horrible with the view, I should use a dummy table

Re: [SQL] Indexing UNIONs

2002-07-15 Thread Stephan Szabo
On Mon, 15 Jul 2002, Josh Berkus wrote: > Stephan, > > > We had a discussion recently on -general about this. Right now the > > planner won't push the conditions down into the arms of the union because > > noone's been sure under what conditions the optimization is safe. > > So, if performance i

Re: [SQL] line datatype

2002-07-15 Thread Bruce Momjian
OK, I have added comments to \dT and SGML docs to mention that 'line' is not implemented. This should help future folks. It would be nice to get the line type working 100%. Thomas says the problem is input/output format. I don't completely understand.