Re: How to write in Postgres - Mailing list pgsql-general

From Alban Hertroys
Subject Re: How to write in Postgres
Date
Msg-id CAF-3MvOAb0MPZsPa+=BGGY9+ysgDb2re66-iJs6i3gv5kPtqPw@mail.gmail.com
Whole thread Raw
In response to How to write in Postgres  (<mgould@isstrucksoftware.net>)
List pgsql-general
On 7 February 2012 15:03, <mgould@isstrucksoftware.net> wrote:
How do I convert this to PostGres. I'm getting a error
ERROR: syntax error at or near "("
LINE 23: set chr = substr(lfeid,idx,1);

Assuming you are writing this as pl/pgsql code, the way you do your variable assignments is wrong on two accounts. Find some time to read the chapter on pl/pgsql if possible ;)

Anyway, that line should read:
chr := substr(lfeid,idx,1);

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

pgsql-general by date:

Previous
From:
Date:
Subject: How to write in Postgres
Next
From: Adrian Klaver
Date:
Subject: Re: default database selector