I don't know why, but for some reason the sequences aren't being created in postgres on demand. I can recreate the problem using 7.4.2, but I don't have a fix at the moment other than manually creating the sequences that cause the errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Indeed, postgres does not create them on demand, but the PEAR DB library is supposed to do so.
I know PG is not MySQL, but serial fields would be a suitable replacement to sequences outside the table, no?
And finally, the reason I didn't create all the sequences (there aren't just these three) is because of the sequence-creation feature of PEAR DB. However, given the problems with it, I just might put all the sequence creation queries in the file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When i try to create a new project:
DB Error: unknown error
SELECT NEXTVAL('phpbt_project_seq') [nativecode=ERROR: relation "phpbt_project_seq" do not exist ]
Sugestions?
Thanks.
I don't know why, but for some reason the sequences aren't being created in postgres on demand. I can recreate the problem using 7.4.2, but I don't have a fix at the moment other than manually creating the sequences that cause the errors.
Thanks, i created 3 sequences, project, component and version. There are more? Is really slow when i create projects after inserting the sequences.
Yes, there are more -- one for almost every table. I'm currently looking into the feasibility of using serial fields instead.
I just installed phpbugtracker and had the same problem.
Why don't you just add these lines to your pgsql.in?
CREATE SEQUENCE phpbt_project_seq;
CREATE SEQUENCE phpbt_version_seq;
CREATE SEQUENCE phpbt_component_seq;
I see you have other sequences in there, it seems you just forgot these.
> the sequences aren't being created in postgres on demand
PostgreSQL doesn't "create sequences on demand", you do have to create them yourself.
> I'm currently looking into the feasibility of using serial fields instead.
PostgreSQL is not like MySQL.
Add these to your pgsql.in:
CREATE SEQUENCE phpbt_project_seq;
CREATE SEQUENCE phpbt_version_seq;
CREATE SEQUENCE phpbt_component_seq;
You have CREATE SEQUENCE statements for other sequences in there, you just forgot these.
Indeed, postgres does not create them on demand, but the PEAR DB library is supposed to do so.
I know PG is not MySQL, but serial fields would be a suitable replacement to sequences outside the table, no?
And finally, the reason I didn't create all the sequences (there aren't just these three) is because of the sequence-creation feature of PEAR DB. However, given the problems with it, I just might put all the sequence creation queries in the file.