This is a multi-part message in MIME format.
------=_NextPart_000_01FE_01C3ECC0.0EDDF8D0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hello
I am trying to do the following:
1. startup my php app
2. check for its database under pgsql
3. If its not there it create it.
4. This may happen for several different apps. I add new apps all the
time.
Attempts:
1.I have tried to connect to the database and check the error for
absence(pg_database) and then try to create it. This fails because the
DATABASE missing is fatal.
2. I have tried to connect to template1 and check pg_database for my
database and if it is not there create it.
a. This works but I get the following warning, myindex is a
serial field for my database. Do test this I go into phpPgAdmin and drop
the addressbook database. Then I open my app to this error. When I
refresh the screen everything works?!
Warning: pg_query(): Query failed: ERROR: relation "info_myindex_seq"
already exists . in /usr/local/apache2/htdocs/AddressBook/index.php on
line 128
Could not create info tableERROR: relation "info_myindex_seq" already
exists
3. If I repeat this sequence with a different app. It is the same
performance but the new app has its tables and the tables from the first
database?!
4. I have tried turning on the sql_inheritence to false without any
help.
5. I cannot connect to template0.
I do not understand the template0 concept, I am coming from the MYSQL
world. Is there a way to do this?????????
Marcel
------=_NextPart_000_01FE_01C3ECC0.0EDDF8D0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml [at] 01C3ECC0.0B5658B0">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.EmailStyle17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
[at] list l0
{mso-list-id:1424914288;
mso-list-type:hybrid;
mso-list-template-ids:-1323117628 67698703 67698713 67698715 67698703 6769=
8713 67698715 67698703 67698713 67698715;}
[at] list l0:level1
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
margin-left:2.0in;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Hello<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>I am trying to do the following:<o:p></o:p></span></font=
></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><span style=3D'mso-tab-count:1'> =
</span>1.
startup my php app <o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>2. check for its database under
pgsql <o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>3. If its not there it create =
it. <o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>4. This may happen for several=
different
apps. I add new apps all the time.<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font=
></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>Attempts:<o:p></o:p></span></f=
ont></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>1.I have tried to connect to t=
he
database and check the error for absence(pg_database) and then try to creat=
e it.
This fails because the DATABASE missing is fatal.<o:p></o:p></span></font><=
/p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'>2. I have tried to connect to
template1 and check pg_database for my database and if it is not there crea=
te
it. <o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'><span style=3D'mso-tab-count:1=
'> </span=
>a.
This works but I get the following warning, myindex is a serial field for my
database. Do test this I go into phpPgAdmin and drop the addressbook databa=
se.
Then I open my app to this error. When I refresh the screen everything work=
s?! <o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font=
></p>
<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 face=3DArial=
><span
style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font=
></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><b><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt;font-weight:bold'>=
Warning</span></font></b>:
pg_query(): Query failed: ERROR: relation "info_myindex_seq" alre=
ady
exists . in <b><span style=3D'font-weight:bold'>/usr/local/apache2/htdocs/A=
ddressBook/index.php</span></b>
on line <b><span style=3D'font-weight:bold'>128</span></b><br>
Could not create info tableERROR: relation "info_myindex_seq" alr=
eady
exists<o:p></o:p></p>
<p class=3DMsoNormal style=3D'margin-left:1.5in'><font size=3D3 face=3D"Tim=
es New Roman"><span
style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>3. If I rep=
eat this
sequence with a different app. It is the same performance but the new app h=
as
its tables and the tables from the first database?!<o:p></o:p></span></font=
></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>4. I have t=
ried
turning on the sql_inheritence to false without any help.<o:p></o:p></span>=
</font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>5. I cannot=
connect
to template0.<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>I do not un=
derstand
the template0 concept, I am coming from the MYSQL world. Is there a way to =
do
this?????????<o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> =
</o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:1.0in;text-indent:.5in'><font siz=
e=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>Marcel <o:p=
></o:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_000_01FE_01C3ECC0.0EDDF8D0--
