anonymous block in Postgres - Hello World

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>, Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Subject: anonymous block in Postgres - Hello World
Date: 2007-05-24 12:30:03
Message-ID: F8B9B12641FB6B4FAC761BDEF9D63B040CFB4680@tlv-ex-01.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

#!/bin/sh

psql --quiet -t << EOF

declare

x varchar(80);

begin

x:='Hello World';

raise notice x;

end;

\q

EOF

======

Hi,

This code is my first "like Oracle anonymous blocl". It does not go through.

Can anyone help?

Thanks

Danny

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-24 13:57:04 Re: Role based database access
Previous Message Fuzzygoth 2007-05-24 09:43:55 Can't drop tables ERROR: cache lookup failed for relation 411727