Paul Lambert wrote:
Just use distinct...
test=# select distinct count(*),substring( href from '.*://([^/]*)' ) as
domain from url group by domain order by domain;
OK so distinct was redundant there... it gives the same results without it.
AutoDRS=# select count(*) as occurances,substring( h
Ah, I figured out what to look for and found my uniq -c solution:
select substring( href from '.*://([^/]*)' ) as hostname, count(substring( href
from '.*://([^/]*)' )) from url where id<10 group by hostname order by count
desc;
hostname | count
--+--
> And what I'd like is something that would give me the counts for the
> number of occurrences of each unique hostname. Something much like
> `uniq -c'. Can anyone tell me how that's done or where I should look
> for info? (I'm not sure what to look for, that's the problem).
>
select substring
[EMAIL PROTECTED] wrote:
And what I'd like is something that would give me the counts for the number of
occurrences of each unique hostname. Something much like `uniq -c'. Can
anyone tell me how that's done or where I should look for info? (I'm not sure
what to look for, that's the problem)
> >> I'm trying to use substr() and position() functions to extract the
> >> full host name (and later a domain) from a column that holds URLs.
> >
> > substring( href from '.*://\([^/]*)' );
> >
typo: no backslash in front of left paren
substring( href from '.*://([^/]*)' )
match up thru //
wi
Hi,
Thanks, perfect! (though I'll have to look into the regex warning):
=> select substring( href from '.*://\([^/]*)' ) as hostname from url where
id<10;
WARNING: nonstandard use of escape in a string literal at character 29
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
So n
Andrej Ricnik-Bay wrote:
Plain regex The key are the parenthesis () ...
basically it will omit ANYTHING + two slashes at the beginning
of a string. Then it will match everything BUT a slash, and as
much of that as possible since regex are greedy by default
(hence the host name he was lookin
On 9/12/07, Paul Lambert <[EMAIL PROTECTED]> wrote:
> > substring( href from '.*://\([^/]*)' );
> Ok, your solution looks better than mine... but I have no idea how to
> interpret that, time to consult some manuals.
Plain regex The key are the parenthesis () ...
basically it will omit ANYTHING
chester c young wrote:
I'm trying to use substr() and position() functions to extract the
full host name (and later a domain) from a column that holds URLs.
substring( href from '.*://\([^/]*)' );
Ok, your solution looks better than mine... but I have no idea how to
interpret that, time to
"Bart Degryse" <[EMAIL PROTECTED]> writes:
> I have a function like below (simplified). Everything works the way I want =
> it to except for one thing.
> After the select statement sum_revenues is NULL instead of the real sum.
> Has this something to do with the earlier deletes and inserts not bein
[EMAIL PROTECTED] wrote:
Hi,
I'm trying to use substr() and position() functions to extract the full host
name (and later a domain) from a column that holds URLs.
This is what I'm trying, but it clearly doesn't do the job.
=> select substr(href, position('://' in href)+3, position('://' in
hr
> I'm trying to use substr() and position() functions to extract the
> full host name (and later a domain) from a column that holds URLs.
substring( href from '.*://\([^/]*)' );
Pinpoint customers who a
Hi,
I'm trying to use substr() and position() functions to extract the full host
name (and later a domain) from a column that holds URLs.
This is what I'm trying, but it clearly doesn't do the job.
=> select substr(href, position('://' in href)+3, position('://' in
href)+3+position('/' in href)
--- Koen Bok <[EMAIL PROTECTED]> wrote:
> I am doing some optimization on our search, but I need some advise...
>
> table: item
>
> idname
> --
> 1 iPod
> 2 Zune
> 3 Walkman
>
> ta
On 9/11/07, Koen Bok <[EMAIL PROTECTED]> wrote:
> Anyone has a hint?
Another way:
SELECT i.*
FROM item i JOIN search_item s1 ON i.ID = s1.id_item
JOIN search_item s2 ON s1.id_item = s2.id_item
JOIN search_item s3 ON s2.id_item = s3.id_item
WHERE s1.id_search = 1
AND s2.id_sear
I am doing some optimization on our search, but I need some advise...
table: item
id name
--
1 iPod
2 Zune
3 Walkman
table: search_item
id_search id_item
---
On 9/11/07, Jyoti Seth <[EMAIL PROTECTED]> wrote:
> Hi ,
> Does postgresql8.2 supports multithreading?
> Thanks,
> Jyoti Seth
This depends entirely on what you mean. No, PostgreSQL isn't a
multithreaded application. Yes, you can write multithreaded
applications that use PostgreSQL. Consult the doc
Dear all
I have a function like below (simplified). Everything works the way I want it
to except for one thing.
After the select statement sum_revenues is NULL instead of the real sum.
Has this something to do with the earlier deletes and inserts not being
committed yet?
I assumed they would have
A. Kretschmer wrote:
> am Tue, dem 11.09.2007, um 12:38:38 +0530 mailte Jyoti Seth folgendes:
>> Hi ,
>>
>>
>>
>> Does postgresql8.2 supports multithreading?
>
> No.
In the bits that (should) matter to end users (ie. libpq), yes, it does.
Regards, Dave
---(end of broa
am Tue, dem 11.09.2007, um 12:38:38 +0530 mailte Jyoti Seth folgendes:
> Hi ,
>
>
>
> Does postgresql8.2 supports multithreading?
No.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwke
Hi ,
Does postgresql8.2 supports multithreading?
Thanks,
Jyoti Seth
21 matches
Mail list logo