From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Félix Sánchez Rodríguez <fesanch(at)ciego(dot)cult(dot)cu> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Creating functions |
Date: | 2009-05-06 19:17:41 |
Message-ID: | dcc563d10905061217k467949bbxe958a5e016914ea5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
2009/5/6 Félix Sánchez Rodríguez <fesanch(at)ciego(dot)cult(dot)cu>:
> Hi:
>
> I tried the code you gave me and it didn't work. I got this error:
> unterminated dollar-quoted string at or near "$$ insert into test(a)
> values($1);"
Yeah, I had an extra # in there. should be:
# create table test (a int);
# create function addone(x int) returns int as $$
insert into test (a) values ($1); select $1;
$$ language sql;
> To be more specfic, I need to create a function to insert a given string
> into a text type field. I don't need to return anything. I'm also wondering
> if you could attach some documentation on this subject. I have troubles with
> the Internet account.
The docs are kind of big to include here. I'll see what I can find
and send off list.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Monnerie | 2009-05-06 19:25:30 | Re: Why postgresql 8.3.5 created temporary files of size less then work_mem on disk ? |
Previous Message | Yves D'Astous | 2009-05-06 18:56:49 | Why postgresql 8.3.5 created temporary files of size less then work_mem on disk ? |