Re: I have problem with Postgres.

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: I have problem with Postgres.
Дата
Msg-id 1037385625.14810.68.camel@jester
обсуждение исходный текст
Ответ на I have problem with Postgres.  (Попов Андрей <andrey@cursor.ru>)
Список pgsql-bugs
On Thu, 2002-11-14 at 03:40, =F0=CF=D0=CF=D7 =E1=CE=C4=D2=C5=CA wrote:
> Hi.
> I have problem with Postgres.
> I have perl script, that add 2 records in 2 tables. This script I run
> from web throught web server Apache (on FreeBSD).
> (perl version 5.005)

You would be better off using the sequence rather than trying to fetch
out max(obj_id).


select currval('object_list_obj_id_seq') AS nextvalue;

after the insert into object_list.

>=20
>     $sth =3D $dbh->prepare("select max(obj_id) from object_list");
>     $sth->execute();
>     $max =3D $sth->fetchrow;

--=20
Rod Taylor <rbt@rbt.ca>

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: new journaling system in OSX
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Get a CD