On 2011-04-20, Saulo VenĂ¢ncio wrote:
> --bcaec52e65e9b2f22304a15f3840
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Hi guys,
> I need your help.
> I have a table called medidas, in this table i have some ocurrences that ha=
> s
> id_medida(primary
Humair Mohammed writes:
> I am running into a behavior with a postgresql function with a SETOF
> refcursor's returning multiple columns. Not sure if there is a different way
> to retrieve a SETOF refcursor's with variable columns? Alternatively can I
> return a primitive value and a refcursor f
You might try:
WITH
pontos AS
(
SELECT column1 AS idponto
FROM (VALUES (10), (11), (23), (24) ) AS a
),
subset AS
(
SELECT b.idponto, date_trunc('day', datetime) AS datetime
FROM medidas b
INNER JOIN pontos USING(idponto)
GROUP BY b.idponto, date_trunc('day', da