Re: [ADMIN] Warm standby terminate itself?

2011-09-20 Thread Rural Hunter
Got it. thanks. 于2011年9月21日 1:31:09,Kevin Grittner写到: Rural Hunter wrote: I set up an warm standby server which fetches WAL logs from a remote server. It has been working very well. But today, I was editing the restore script(which is set as the restore_command) with vi. Just right after I sa

Re: [ADMIN] currval()

2011-09-20 Thread Steve Crawford
On 09/20/2011 04:06 PM, Marc Fromm wrote: My postgres version is 8.1. Last I heard RETURNING id started in 8.2. I'd advise upgrading. 8.1 is no-longer supported (end-of-life was last November) and 8.2 has an end-of-life date in just a couple months. You'll get security and bug fixes, performa

Re: [ADMIN] currval()

2011-09-20 Thread Steve Crawford
On 09/20/2011 03:00 PM, Marc Fromm wrote: I am trying to get the id of the current inserted record. The field name is 'id' and it is a primary key. I am obviously missing the correct syntax. I cannot use RETURNING id. $sql = "INSERT INTO jobs (job_title, num_positions, pay_min, pay_max,

[ADMIN] currval()

2011-09-20 Thread Marc Fromm
I am trying to get the id of the current inserted record. The field name is 'id' and it is a primary key. I am obviously missing the correct syntax. I cannot use RETURNING id. $sql = "INSERT INTO jobs (job_title, num_positions, pay_min, pay_max,

Re: [ADMIN] returning id

2011-09-20 Thread Guillaume Lelarge
On Tue, 2011-09-20 at 15:55 -0400, Tom Lane wrote: > Marc Fromm writes: > > Can I use "RETURNING id" in an insert statement with postgresql version > > 8.1.10? > > No. I don't recall just when RETURNING was added, but for sure it was > after 8.1. > I checked. It appeared in 8.2. Sooner than I

Re: [ADMIN] returning id

2011-09-20 Thread Tom Lane
Marc Fromm writes: > Can I use "RETURNING id" in an insert statement with postgresql version > 8.1.10? No. I don't recall just when RETURNING was added, but for sure it was after 8.1. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)

Re: [ADMIN] returning id

2011-09-20 Thread Lonni J Friedman
On Tue, Sep 20, 2011 at 12:31 PM, Marc Fromm wrote: > Can I use “RETURNING id” in an insert statement with postgresql version > 8.1.10? > > I cannot find a clear example on how to use it to capture the id created by > the insert statement into a variable in PHP. > > > > Many examples are like this

[ADMIN] returning id

2011-09-20 Thread Marc Fromm
Can I use "RETURNING id" in an insert statement with postgresql version 8.1.10? I cannot find a clear example on how to use it to capture the id created by the insert statement into a variable in PHP. Many examples are like this but don't state how to access the returned id: INSERT INTO Addresses

Re: [ADMIN] Warm standby terminate itself?

2011-09-20 Thread Kevin Grittner
Rural Hunter wrote: > I set up an warm standby server which fetches WAL logs from a > remote server. It has been working very well. But today, I was > editing the restore script(which is set as the restore_command) > with vi. Just right after I saved the script, I noticed suddenly > the standby

[ADMIN] Warm standby terminate itself?

2011-09-20 Thread Rural Hunter
Hi, I set up an warm standby server which fetches WAL logs from a remote server. It has been working very well. But today, I was editing the restore script(which is set as the restore_command) with vi. Just right after I saved the script, I noticed suddenly the standby server terminated. I che