Tom Lane, 08.04.2010 10:59:
Thomas Kellerer writes:
CREATE OR REPLACE FUNCTION get_employees(name_pattern varchar)
RETURNS TABLE(id integer, full_name text)
AS
$$
BEGIN
RETURN QUERY
SELECT id, first_name||' '||last_name
FROM employee
WHERE last_name LIKE name_pattern ||
2010/4/8 Thomas Kellerer :
> Hi,
>
> I'm playing around with functions returning result sets, and I have a
> problem with the following function:
>
> -- Create sample data
> CREATE TABLE employee (id integer, first_name varchar(50), last_name
> varchar(50));
> INSERT INTO employee values (1, 'Arthu
Thomas Kellerer writes:
> CREATE OR REPLACE FUNCTION get_employees(name_pattern varchar)
> RETURNS TABLE(id integer, full_name text)
> AS
> $$
> BEGIN
>RETURN QUERY
> SELECT id, first_name||' '||last_name
> FROM employee
> WHERE last_name LIKE name_pattern ||'%';
> END
> $$
> L
On 9/28/05, Tom Lane <[EMAIL PROTECTED]> wrote:
> Ian Meyer <[EMAIL PROTECTED]> writes:
> > IF TG_OP = 'DELETE' AND OLD.deleted = FALSE THEN
>
> > ERROR: record "old" is not assigned yet
> > DETAIL: The tuple structure of a not-yet-assigned record is indeterminate.
> > CONTEXT: PL/pgSQL functi
Ian Meyer <[EMAIL PROTECTED]> writes:
> IF TG_OP = 'DELETE' AND OLD.deleted = FALSE THEN
> ERROR: record "old" is not assigned yet
> DETAIL: The tuple structure of a not-yet-assigned record is indeterminate.
> CONTEXT: PL/pgSQL function "thread_sync" line 2 at if
> What am I failing to under
>
> Hi I'm trying to update a table column with a pl/pgsql function and a
> trigger.
> But I didn't managed to make it work so far.
>
> Here's my function code :
>
> CREATE FUNCTION public.calcul_impact() RETURNS opaque AS '
>
> DECLARE
> id_line integer;
> quantity integer;
> single_price
Tom Lane wrote:
> Carlo Vitolo <[EMAIL PROTECTED]> writes:
> > This does not work. The error is ERROR: pg_atoi: error in "12.00": can't
> > parse ".00"
>
> What PG version are you running? It seems to work fine for me in
> current sources:
>
>
Ver. 7.1.2
>
> BTW, the way you are writing the fu
Carlo Vitolo <[EMAIL PROTECTED]> writes:
> This does not work. The error is ERROR: pg_atoi: error in "12.00": can't
> parse ".00"
What PG version are you running? It seems to work fine for me in
current sources:
regression=# create table magazzino (quantita numeric(10,2),
regression(# descrizio
Hi, there,
modify the code as following.
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.ipinc.com
On Mon, 18 Dec 2000 [EMAIL PROTECTED] wrote:
> Hi,
>
> I hope my question is appropriate for this list.
I don't think you return should have '' around them, i.e.
RETURN distance;
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Mon, 18 Dec 2000 [EMAIL PROTECTED] wrote:
> Hi,
>
> I hope my question is appropriate for this list. I'm trying to create
> a fu
10 matches
Mail list logo