Re: [SQL] Recursive request ...

2003-07-16 Thread BenLaKnet
I see connect by in Oracle ??? is there an equivalent in PostgreSQL or not ?? Rajesh Kumar Mallah a écrit: Dear Bournon, There are already good implementation of Tree structures in databases ranging from using pure SQL to PostgreSQL specfic methods , less point in revinting wheel unl

Re: [SQL] relevance

2003-07-16 Thread Terence Kearns
select id from tablename where message like '%sql%'; If there any way to determine exactly how many times 'sql' is matched in that search in each particular row, and then sort by the most matches, or am I going to have to write a script to do the sorting for me? You could probably write a functio

Re: [SQL] relevance

2003-07-16 Thread Oleg Bartunov
Have you seen contrib/tsearch ? http://www.sai.msu.su/~megera/postgres/gist/tsearch/ Oleg On Wed, 16 Jul 2003, jtx wrote: > I'm trying to build a really basic search engine for a site I'm using - > say I'm going to simplify this as much as I can. > > Say I have a table with 2 columns: id, messag

[SQL] relevance

2003-07-16 Thread jtx
I'm trying to build a really basic search engine for a site I'm using - say I'm going to simplify this as much as I can. Say I have a table with 2 columns: id, message Person wants to search for the term 'sql'. So, I'd do a simple search like: select id from tablename where message like '%sql%'

Re: [SQL] numerical sort on mixed alpha/numeric data

2003-07-16 Thread Bruno Wolff III
On Wed, Jul 16, 2003 at 11:41:06 -0500, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Wed, Jul 16, 2003 at 12:48:26 +0100, > Gary Stainburn <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > I've got a table holding loco numbers and an id which references the locos > > table. How can I sort t

Re: [SQL] numerical sort on mixed alpha/numeric data

2003-07-16 Thread Bruno Wolff III
On Wed, Jul 16, 2003 at 12:48:26 +0100, Gary Stainburn <[EMAIL PROTECTED]> wrote: > Hi folks, > > I've got a table holding loco numbers and an id which references the locos > table. How can I sort this table, so that numeric values appear first in > numerical order followed by alpha in alpha o

Re: [SQL] Data Warehousing

2003-07-16 Thread Dani Oderbolz
Rudi Starcevic wrote: Hi, I'd like to learn about Data Warehousing - using PostgreSQL of course. I've been looking around for some good starting info. on this subject without a lot of joy so I'd like to ask if anyone could point me to a good starting off doco. or tutorial. I have found some da

Re: [SQL] pg_dump "feature"

2003-07-16 Thread Viorel Dragomir
Thanks for the answer[s]. Interesting that when i launch the command from php through exec() it works fine even on pg_dump 7.3.x I guess this feature works only on [shell] command line. This is the php code: $tmp_fname = tempnam("/tmp", "file-"); $f = fopen($tmp_fname, "w");

Re: [SQL] numerical sort on mixed alpha/numeric data

2003-07-16 Thread Gary Stainburn
On Wednesday 16 July 2003 3:27 pm, Dmitry Tkach wrote: > Gary Stainburn wrote: > >Hi folks, > > > >I've got a table holding loco numbers and an id which references the locos > >table. How can I sort this table, so that numeric values appear first in > >numerical order followed by alpha in alpha ord

Re: [SQL] numerical sort on mixed alpha/numeric data

2003-07-16 Thread Dmitry Tkach
Gary Stainburn wrote: Hi folks, I've got a table holding loco numbers and an id which references the locos table. How can I sort this table, so that numeric values appear first in numerical order followed by alpha in alpha order.? What about select lnid,lnumber,lncurrent from (select *, cas

Re: [SQL] pg_dump "feature"

2003-07-16 Thread Tom Lane
"Viorel Dragomir" <[EMAIL PROTECTED]> writes: > In 7.3.x the pg_dump accepts the password only from stdin. The user must en= > ter his password. > It's a feature or a bug, because i can't see any logic in this behaviour. It's a feature ... or at least an intentional change. If you want to keep yo

[SQL] Data Warehousing

2003-07-16 Thread Rudi Starcevic
Hi, I'd like to learn about Data Warehousing - using PostgreSQL of course. I've been looking around for some good starting info. on this subject without a lot of joy so I'd like to ask if anyone could point me to a good starting off doco. or tutorial. I have found some data out there but what I

[SQL] numerical sort on mixed alpha/numeric data

2003-07-16 Thread Gary Stainburn
Hi folks, I've got a table holding loco numbers and an id which references the locos table. How can I sort this table, so that numeric values appear first in numerical order followed by alpha in alpha order.? nymr=# \d lnumbers Table "lnumbers" Column | Type

Re: [SQL] problem with temporary table.

2003-07-16 Thread Jonathan Gardner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 10 July 2003 03:03, Vijay Kumar wrote: > Hi, > We are using postgresql7.3.3, we are encountering some problems by > using temporary tables. > > Actually our requirement was, > 1. create temporary table. > 2. insert some

[SQL] pg_dump "feature"

2003-07-16 Thread Viorel Dragomir
In 7.1.2 you can launch this command without any problems: pg_dump -u -s database < file.txt   where file.txt contains 2 lines: username password ~ ~ ~   And you'll get the dump of the .   In 7.1.3 this command work, the only incovenience is that pg_dump shows "User name: Password:" but get