| From: | Dmitry A Brutckevich <owld(at)mail(dot)ru> |
|---|---|
| To: | pgsql-interfaces(at)postgresql(dot)org |
| Subject: | SERIAL type in PHP |
| Date: | 1999-09-14 09:17:41 |
| Message-ID: | 37DE12B5.D7B3A714@mail.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
Hi All !
I am get a some problem :
When i write in php
<?php
$dbase=pg_connect("host=somehost.domain.ru user=$login password=$pass
port=5432 dbname=maindb");
$result=pg_Exec($dbase, " CREATE table users (userid serial) ");
?>
my brower ( and log on server ) write to me :
Warning: PostgresSQL query failed: pqReadData() -- backend closed the
channel unexpectedly. This probably means the backend terminated
abnormally before or while processing the request. in
/usr/local/rubin/system/generating.phtml on line 134
I am rewrite:
$dbase=pg_connect("host=somehost.domain.ru user=$login password=$pass
port=5432 dbname=maindb");
$result=pg_Exec($dbase, " CREATE SEQUENCE users_userid_seq ");
$result=pg_Exec($dbase, " CREATE TABLE users ( userid INT4 DEFAULT
nextval('users_userid_seq')) ");
$result=pg_Exec($dbase, " CREATE UNIQUE INDEX users_userid_key on users
(userid) " );
And all work properly. No warnings.
Where is problem ?
Dmitry
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nuchanach Klinjun | 1999-09-14 09:31:53 | ODBC |
| Previous Message | Andreas Theofilu | 1999-09-14 08:34:38 | Found error with apostrophes in ecpg |