Re: [SQL] delete item[5] from varchar[] array???

2005-09-21 Thread Matthew Peter
Ya. I didn't see any in the \df. If it's so simple could you show me one? PLEEEASE Thanks MP --- Tom Lane <[EMAIL PROTECTED]> wrote: > Matthew Peter <[EMAIL PROTECTED]> writes: > > How is it possible to delete an item from a single > > dimension varchar[] array? > > AFAIR there is no

Re: [SQL] delete item[5] from varchar[] array???

2005-09-21 Thread Tom Lane
Matthew Peter <[EMAIL PROTECTED]> writes: > How is it possible to delete an item from a single > dimension varchar[] array? AFAIR there is no built-in function for this, but it seems like you could write a generic polymorphic function for it easily enough. regards, tom lan

Re: [SQL] delete item[5] from varchar[] array???

2005-09-21 Thread Michael Fuhr
On Wed, Sep 21, 2005 at 06:56:36PM -0700, Matthew Peter wrote: > How is it possible to delete an item from a single > dimension varchar[] array? Lets say it has the values > {1,2,3,4,5,6}... how do i delete at position [4]? I'm not sure if there's a better way, but you could concatenate the slices

[SQL] delete item[5] from varchar[] array???

2005-09-21 Thread Matthew Peter
How is it possible to delete an item from a single dimension varchar[] array? Lets say it has the values {1,2,3,4,5,6}... how do i delete at position [4]? Could this be done in a SQL statement or a function? I appreciate any help. Thank you MP _

Re: [SQL] R-tree and start/end queries

2005-09-21 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > There is a built in type for line segments that uses floating point. That > will probably be usable by you directly unless the integers can can large > enough that precision is a problem. There is an overlaps operator for the > geometric types that coul

Re: [SQL] R-tree and start/end queries

2005-09-21 Thread Dmitri Bichko
How does the performance of the R-tree searches compare to the Bio::GFF binning approach? I've been wondering for a while how well the postgres builtins would do for this application. Dmitri > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chris Mu

Re: [SQL] R-tree and start/end queries

2005-09-21 Thread Chris Mungall
On Wed, 21 Sep 2005, Sean Davis wrote: > I have a table like: > > Create table gf ( > pkserial, > start int, > end int, > gfvarchar > ); > > I want to do queries along the lines of: > > "find all gf that overlap with (1,2)" or > "find all gf that overlap with eac

Re: [SQL] R-tree and start/end queries

2005-09-21 Thread Bruno Wolff III
On Wed, Sep 21, 2005 at 13:52:40 -0400, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a table like: > > Create table gf ( > pkserial, > start int, > end int, > gfvarchar > ); > > I want to do queries along the lines of: > > "find all gf that overlap with (1,2

[SQL] R-tree and start/end queries

2005-09-21 Thread Sean Davis
I have a table like: Create table gf ( pkserial, start int, end int, gfvarchar ); I want to do queries along the lines of: "find all gf that overlap with (1,2)" or "find all gf that overlap with each other" And others. I have read over the documentation, but I

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread A. Kretschmer
am 21.09.2005, um 14:56:25 +0200 mailte A. Kretschmer folgendes: > update t_new set name = ... Sorry, wrong. The corect answer is in the tread. Regards, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Gnanavel S
On 9/21/05, Joost Kraaijeveld <[EMAIL PROTECTED]> wrote: Hi,I made a mistake in describing the query I tried. The query I tried was:update new_tableset new_attribute = (select old_attribute from old_table, new_tablewhere old_table.id = new_table.id)where old_table.id = new_table.id It should be wr

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Leif B. Kristensen
On Wednesday 21 September 2005 14:36, Joost Kraaijeveld wrote: > Hi, > > I have an old_table with two columns: "id" and "old_attribute". I > have new table with the columns "id" and "new_attribute". > > old_table and new_table contain exactly the same id's. Now I want to > copy all the old_attribut

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Joost Kraaijeveld
Thanks all. Too much coffee, too little sleep. -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: [EMAIL PROTECTED] web: www.askesis.nl ---(end of broadcast)---

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Gnanavel S
On 9/21/05, Joost Kraaijeveld <[EMAIL PROTECTED]> wrote: Hi,I have an old_table with two columns: "id" and "old_attribute". I havenew table with the columns "id" and "new_attribute".old_table and new_table contain exactly the same id's. Now I want to copy all the old_attribute from old_table to the

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Thomas Pundt
Hi, On Wednesday 21 September 2005 14:36, Joost Kraaijeveld wrote: | Is that possible in a SQL script (pgadmin or psql console?) and if so, | what is the syntax in this example? funny that you mention pgadmin :-) | insert into new_table(new_attribute) | value( select old_attribute from old_table

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread A. Kretschmer
am 21.09.2005, um 14:36:26 +0200 mailte Joost Kraaijeveld folgendes: > Hi, > > I have an old_table with two columns: "id" and "old_attribute". I have > new table with the columns "id" and "new_attribute". There are indexes on id? > Is that possible in a SQL script (pgadmin or psql console?) a

Re: [SQL] How to add column from old_table to new_table?

2005-09-21 Thread Joost Kraaijeveld
Hi, I made a mistake in describing the query I tried. The query I tried was: update new_table set new_attribute = (select old_attribute from old_table, new_table where old_table.id = new_table.id) where old_table.id = new_table.id It actually returns the error "ERROR: more than one row returne

[SQL] How to add column from old_table to new_table?

2005-09-21 Thread Joost Kraaijeveld
Hi, I have an old_table with two columns: "id" and "old_attribute". I have new table with the columns "id" and "new_attribute". old_table and new_table contain exactly the same id's. Now I want to copy all the old_attribute from old_table to the corresponding new_attribute in the new_table Is t