Re: [SQL] yet another simple SQL question

2007-06-25 Thread manchicken
-up below is untested)... select regexp_replace(COLUMN, '(.*)\\s\\w$', '\\1', 'g') ... This doesn't seem like a difficult thing to do in application code. It seems like it makes more sense to do it there. -- ~ manchicken <>< (A)bort, (R)etry, (I

Re: [SQL] another simple SQL question

2007-06-25 Thread manchicken
; your support. > > THANKS! > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend You may want to consider breaking those out into individual columns. It's much easier to put those together later on than it is to se

Re: [SQL] simple SQL question

2007-06-25 Thread manchicken
gt; figure out a quick solution. Does anyone have any suggestions? > > > > Don't use to_char unless you actually want character data though. > > > > Just try this... > > > > SELECT (column/100) FROM table; > > Cast the column in order to get the decimal

Re: [SQL] simple SQL question

2007-06-25 Thread manchicken
"to_char(int, text)", details here - > http://www.postgresql.org/docs/current/static/functions-formatting.html Don't use to_char unless you actually want character data though. Just try this... SELECT (column/100) FROM table; -- ~ manchicken <>< (A)bort, (R)etry, (I)

Re: [SQL] Counting all rows

2007-06-23 Thread manchicken
; > Andreas Is there any neat trick for doing this for paging estimates? It looks like the only way to get a result count from a more complex query is to either fetch a count first, or to fetch all records and count them in the application. -- ~ manchicken <>< (A)bort, (R)etry, (I)n

Re: [SQL] tsearch2() trigger and domain types...

2007-06-19 Thread manchicken
On Tuesday 19 June 2007 09:08:23 Tom Lane wrote: > oidtype = getBaseType(oidtype); I patched this in a FreeBSD 6.2 port. Attached is the patch. Thanks a lot for the help on this. It works like a charm. -- ~ manchicken <>< (A)bort, (R)etry, (I)nfluence with large hammer. 09 F9 11

Re: [SQL] tsearch2() trigger and domain types...

2007-06-19 Thread manchicken
to fix this to reconstruct the table without domains? I'd really prefer not to abandon domains if at all possible. -- ~ manchicken <>< (A)bort, (R)etry, (I)nfluence with large hammer. 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Please avoid sending me Word or PowerPoint attachments. See htt