Re: [SQL] Multiple SRF parameters from query

2005-06-04 Thread Michael Fuhr
On Sat, Jun 04, 2005 at 06:19:35PM +0200, Federico Pedemonte wrote: > > What i'm trying to do is a query where i get a result of this kind > > a | b | c > --+---+--- > 1 | 2 | 3 > 5 | 9 | 1 > 4 | 0 | 0 > 2 | 0 | 0 > 0 | 0 | 0 > > given that i select from the table Anagrafica the fields 'a

Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-04 Thread Bruce Momjian
Joe Conway wrote: > Bruce Momjian wrote: > > Joe Conway wrote: > >> > >>Any thoughts on how this should be handled for an empty 1D array? > > > > No one responed to this email, so I will try. Is this the one > > dimmentional array you were talking about? > > > > test=> select array_dims('{}'

Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-04 Thread Joe Conway
Bruce Momjian wrote: Joe Conway wrote: Any thoughts on how this should be handled for an empty 1D array? No one responed to this email, so I will try. Is this the one dimmentional array you were talking about? test=> select array_dims('{}'::integer[]); array_dims --

Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-04 Thread Bruce Momjian
Joe Conway wrote: > Tom Lane wrote: > > I think he's got a good point, actually. We document the ARRAY-with- > > parens-around-a-SELECT syntax as > > > > The resulting one-dimensional array will have an element for > > each row in the subquery result, with an element type matching > >

Re: [SQL] Multiple SRF parameters from query

2005-06-04 Thread Federico Pedemonte
On Wed, 2005-06-01 at 10:29 +0530, Ramakrishnan Muralidharan wrote: > Hi, > > I am not able to understand "Returning only one row", since 'aaa' having 2 > rows and 'bbb' having 3 rows and what criteria single row should be returned. > Please let me know the expected result and I will try to fi

[SQL] Tsearch2 headline usage

2005-06-04 Thread Rajesh Kumar Mallah
Hi There, We are using tsearch2 for FTS implementation. For highlighting the search term in the result we are displaying the output of headline function which is supposed to tag (mark up) those stemmed words in the text that match any of the stemmed words in search term. The problem is that some