Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group