2013/3/7 Graham Leggett :
(...)
>> Which psql version are you using, and what is the table definition?
>
> Version as below, from RHEL6:
>
> psql (PostgreSQL) 8.4.13
Aha, there is your problem:
testdb=# SELECT version();
version
---
Thanks for the link / explanation -- hadn't seen this use before.
GW
- Original Message -
> From: Adrian Klaver
> To: Greg Williamson
> Cc: "pgsql-general@postgresql.org"
> Sent: Wednesday, March 6, 2013 3:13 PM
> Subject: Re: [GENERAL] ERROR: synta
On 07 Mar 2013, at 1:05 AM, Ian Lawrence Barwick wrote:
>> Can anyone explain what might be going wrong, and what I should do instead?
>>
>> patricia=# \set content `cat /tmp/certificates.txt`
>> patricia=# update property set value = :'content' where key =
>> 'patricia.home.security.cacerts';
On 03/06/2013 03:04 PM, Greg Williamson wrote:
Graham --
From: Graham Leggett
To: "pgsql-general@postgresql.org"
Sent: Wednesday, March 6, 2013 2:41 PM
Subject: [GENERAL] ERROR: syntax error at or near ":"
Hi all,
I have a text file,
Greg,
2013/3/7 Greg Williamson :
>
>
> 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
On 03/06/2013 02:41 PM, Graham Leggett wrote:
Hi all,
I have a text file, and I need to update the value of an element in a table
with the contents of this text file. Following the instructions at
http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file
I
2013/3/7 Graham Leggett :
> Hi all,
>
> I have a text file, and I need to update the value of an element in a table
> with the contents of this text file. Following the instructions at
> http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file
> I tried this
Graham --
>
> From: Graham Leggett
>To: "pgsql-general@postgresql.org"
>Sent: Wednesday, March 6, 2013 2:41 PM
>Subject: [GENERAL] ERROR: syntax error at or near ":"
>
>Hi all,
>
>I have a text file, and I ne
Hi all,
I have a text file, and I need to update the value of an element in a table
with the contents of this text file. Following the instructions at
http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file
I tried this, but get the error below, which I do
On Wed, Apr 29, 2009 at 07:54:20AM -0700, DaNieL wrote:
> ERROR: syntax error at or near "IF"
>
> Where am i mistaken?
>
> p.s: dont focus on the example functionality, its just a trial for me
> to understand the transactions.. and now, the IF clause...
As others have said, IF statements are on
: pgsql-general@postgresql.org
Subject: [GENERAL] ERROR: syntax error at or near "IF"... why?
Hi guys, im new with postgresql, and already got my first problem..
Well, I wroted some code for understend how the transaction works,
following step by step the manual.
TO make it short, i'
Daniel,
IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN
ROLLBACK;
END IF
COMMIT;
i always get the error
ERROR: syntax error at or near "IF"
Where am i mistaken?
SELECT returns in essence a record or setof records.
DECLARE _credit int;
...
SELECT credit FROM users WHERE name = '
Hi guys, im new with postgresql, and already got my first problem..
Well, I wroted some code for understend how the transaction works,
following step by step the manual.
TO make it short, i've created 2 tables, user and movements: in the
firs one there are the name, email and credit colons, in th
On Thu, Apr 30, 2009 at 1:45 AM, DaNieL..! wrote:
>>
>> > IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN
>> > ROLLBACK;
>> > END IF
>> > COMMIT;
>>
>> > i always get the error
>> > ERROR: syntax error at or near "IF"
>>
if you're inside a server-side function then you cannot use COM
DaNieL..! wrote:
I tryed the declare, before and after the BEGIN;, but allways returns
me the error:
---
ERROR: syntax error at or near "int";
LINE 1: DECLARE _mycredit int;
^
--
On 30/04/2009 07:45, DaNieL..! wrote:
> I tryed the declare, before and after the BEGIN;, but allways returns
> me the error:
> ---
> ERROR: syntax error at or near "int";
> LINE 1: DECLARE _mycredit int;
>
On 30 Apr, 07:30, Johan Nel wrote:
> Daniel,
>
> > IF (SELECT credit FROM users WHERE name = 'mary') < 0 THEN
> > ROLLBACK;
> > END IF
> > COMMIT;
>
> > i always get the error
> > ERROR: syntax error at or near "IF"
>
> > Where am i mistaken?
>
> SELECT returns in essence a record or setof recor
On Dec 27, 2004, at 11:36 AM, vinita bansal wrote:
FOR for1 in select qi.tril_gid as
vQuotaInstanceGID,qi.startdate as vQIStartDate,qi.enddate as
vQIEndDate from cm_quotainstance as qi, cm_quota as q, fs_agr as a
where a.fs_unid = AGR_UNID and a.fs_model = q.model and qi.quota =
q.tril_g
This is the error i am getting when calling select * from
cas_reset_qi_changedate('CAS','2003-02-03'
ERROR: syntax error at or near "$1" at character 25
CONTEXT: PL/pgSQL function "cas_reset_qi_changedate" line 15 at for over
select rows
pgsql function :
CREATE or replace FUNCTION qe13.CAS_RE
19 matches
Mail list logo