pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yasir Malik <ymalik@cs.stevens-tech.edu>
To: Kemin Zhou <kemin.zhou@ferring.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: begin update ... syntax error
Date: Sat, 10 Apr 2004 18:19:48 -0400 (EDT)
Message-ID: <Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu> (raw)
In-Reply-To: <407867FE.1030501@ferring.com>
References: <407867FE.1030501@ferring.com>

Kemin,
Instead of just begin, have "begin;" and put "commit;" at the end of the
SQL statement.  Go here for more information:
http://developer.postgresql.org/docs/postgres/tutorial-transactions.html

Regards,
Yasir

On Sat, 10 Apr 2004, Kemin Zhou wrote:

> Date: Sat, 10 Apr 2004 14:32:46 -0700
> From: Kemin Zhou <kemin.zhou@ferring.com>
> To: pgsql-sql@postgresql.org
> Subject: [SQL] begin update ... syntax error
>
> I was trying to speed up a simple update query
>
> fri=# begin
> fri-# update tabA set nobegin=tmp.nobegin, noend=tmp.noend
> fri-# from tmp
> fri-# where tabA.acc=tmp.acc;
> ERROR:  syntax error at or near "update" at character 7
>
> The same query can be run with no problem if not starting with BEGIN.
>
> Does mean that BEGIN cannot preceed UPDATE?
>
> Or I am making some obvious miskate?
>
> Kemin
>
>
>
>
> **********************************************************************
> Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be contained in the message. If you are not the addressee indicated in this message (or responsible for the delivery of the message to such person), please do not copy or deliver this message to anyone. In such case, please destroy this message and notify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to e-mail for messages of this kind. Opinions, conclusions and other information in this message represent the opinion of the sender and do not necessarily represent or reflect the views and opinions of Ferring.
> **********************************************************************
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>



view thread (4+ messages)

Message-ID: <Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu>
Permalink:  ../Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu/
Also on:    postgresql.org/message-id/Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ymalik@cs.stevens-tech.edu, kemin.zhou@ferring.com
  Subject: Re: begin update ... syntax error
  In-Reply-To: <Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu>
  References: <407867FE.1030501@ferring.com> <Pine.NEB.4.58.0404101817370.26194@pink-elephant.cs.stevens-tech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox