Re: ERROR: syntax error at or near ":" - Mailing list pgsql-general

From Ian Lawrence Barwick
Subject Re: ERROR: syntax error at or near ":"
Date
Msg-id CAB8KJ=hMtsESx3Bwz95fG2GXdNh5A3VRHHV4_b_q1VzHoANkdw@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: syntax error at or near ":"  (Greg Williamson <gwilliamson39@yahoo.com>)
List pgsql-general
Greg,

2013/3/7 Greg Williamson <gwilliamson39@yahoo.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
notcoming 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


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: ERROR: syntax error at or near ":"
Next
From: Jeff Janes
Date:
Subject: Re: WAL_DEBUG