Re: [SQL] dynamic OUT parameters?

2009-01-31 Thread Craig Ringer
gher...@fmed.uba.ar wrote: > Well, aparenty my problem remains, because the boss want that the > programmers just need to call > select * from report('table_name'). Then, AFAIK, you're not going to have much luck, as Pg needs to know the columns that'll be output before the function is called. Ap

Re: [SQL] dynamic OUT parameters?

2009-01-31 Thread gherzig
> gher...@fmed.uba.ar wrote: > >> Oh, that looks promising. I wrongly supposed that RETURNING SETOF RECORD >> forces the use of OUT parameters. I will give your idea a try. > > Tom Lane's point about using a refcursor is (unsurprisingly) a good one. > If you return a refcursor from your function, y

Re: [SQL] regexp_replace and UTF8

2009-01-31 Thread Jasen Betts
On 2009-01-30, Bart Degryse wrote: > > --=__Part8EA648F8.0__= > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > > Hi, > I have a text field with data like this: 'de patiƫnt niet' > (without the quotes). > I would like to convert this string to look like this