[GENERAL] Re: [postgis-users] Error with "return query" ( "return next" working ) with custom type

2013-10-22 Thread Steve Grey
try: RETURN QUERY SELECT 1,1,1,1; The error message means the cast failed between ttt.fake_topogeometry and the topology_id (i.e. first) field of the return type of the function, which isn't what you wanted to do. Pls. don't cross-post between lists. On 23 October 2013 01:21, Rémi Cura wrote

Re: [GENERAL] Full Text Search ideas

2010-07-19 Thread Steve Grey
On 19 July 2010 01:46, Howard Rogers wrote: > On Mon, Jul 19, 2010 at 6:16 AM, Tom Lane wrote: > > Howard Rogers writes: > >> ims=# select count(*) from search_rm > >> where to_tsvector('english', textsearch) @@ to_tsquery('english','bat & > sb12n'); > >> count > >> --- > >> 3849 > >> (1 r

Re: [GENERAL] Full Text Search dictionary issues

2010-07-16 Thread Steve Grey
Does it run any differently if you split out the tag? select count(*) from search_rm where to_tsvector('english', textsearch) @@ to_tsquery('english', 'woan & batt') and to_tsvector('english', textsearch) @@ 'ftx1'::tsquery Steve On 16 July 2010 05:22, Howard Rogers wrote: > On Fri, Jul

Re: [GENERAL] dropdb weirdness

2010-06-30 Thread Steve Grey
Silly ideas, but is dropdb confusing the "postgres" user on the host and a database named "postgres"? (does the 1st database the command was run on still exist?) Does it do it right if the -U and -W switches are used? Steve On 29 June 2010 22:38, Geoffrey wrote: > Tom Lane wrote: > >> Adria

Re: [GENERAL] SQL Query

2007-12-05 Thread Steve Grey
Hi, Its not elegant, and certainly not dynamic or the perfect solution or for anything but a static dataset but I've approached this in SQL before as... First work out the maximum number of times each value of X will occur in the table - something like "select max(subfoo.ycount) from (select foo.