Re: ERROR: syntax error at or near ":"

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: syntax error at or near ":"
Date: 2013-03-06 23:10:23
Message-ID: CAB8KJ=hMtsESx3Bwz95fG2GXdNh5A3VRHHV4_b_q1VzHoANkdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg,

2013/3/7 Greg Williamson <gwilliamson39(at)yahoo(dot)com>:
>
>
> Graham --
(...)
> The colon (":") is not needed, just remove it. A pair of colons is used to indicate a cast of a value; off hand I am not coming up with any use of a colon in basic SQL.

This is psql-specific syntax; the colon should cause the value of the
psql variable 'content' to be interpreted; without it, the string
'content' would be inserted.

See:
http://www.postgresql.org/docs/current/interactive/app-psql.html#APP-PSQL-INTERPOLATION

Regards

Ian Barwick

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2013-03-06 23:12:40 Re: WAL_DEBUG
Previous Message Adrian Klaver 2013-03-06 23:09:39 Re: ERROR: syntax error at or near ":"