By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Can't set variable without an error

P: 1
I'm trying to put together a fairly simple query, or at least I thought it was, but even the most basic parts don't want to work so I have to take this piece-by-piece.

I am trying to declare a varialbe in PostgreSQL 8.4 and when I put in this:
Expand|Select|Wrap|Line Numbers
  1. url varchar := '';
I get this:
Expand|Select|Wrap|Line Numbers
  1. :6: ERROR:  syntax error at or near "varchar"
  2. LINE 1:  url varchar := '';
I get the same thing if I try to start the line with "declare "

Somehow I am missing something.
Jul 23 '13 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 700
Are you put it in plpgsql function?
Jul 24 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.