Re: Functions with dynamic queries - Mailing list pgsql-sql

From Rajesh Kumar Mallah.
Subject Re: Functions with dynamic queries
Date
Msg-id 200205261555.59986.mallah@trade-india.com
Whole thread Raw
In response to Re: Functions with dynamic queries  (Gabriel Dovalo Carril <dovalo@terra.es>)
Responses Re: Functions with dynamic queries  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
List pgsql-sql
Hi Gabriel,

sorry for the late response,

I tried both the scripts  and they do work.

psql -h 192.168.0.11 -U tradein  test -f b.sql
DROP
psql:b.sql:6: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'people_pkey' for table 'people'
CREATE
INSERT 27856939 1
INSERT 27856940 1
DROP
CREATEget_age
---------10
(1 row)

Hmm, am i missing anything ?

mallah.







Try attached scripts. They are only examples, (no real data)They are very, very simple and fails in the same situation.

> The only difference between then is line 19
>
> (func_error.sql)
> Select people.age into person
>
> (func_nodata.sql)
> Select max(people.age) as age into person
>
>
> The first one returns:
> ERROR:  record person is unassigned yet
>
> And the second one:
>  get_age
> ---------
>
> (1
> row)

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.




pgsql-sql by date:

Previous
From: "Julian Scarfe"
Date:
Subject: XSD to Postgresql SQL
Next
From: "||//::..-cwhisperer-..:://||"
Date:
Subject: uinique identifier