Search found 10 matches

by LER
Wed Feb 16, 2005 2:59 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

Posted to the mailing list pointing at this thread.
by LER
Wed Feb 16, 2005 2:05 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

A sequence table would create additional tables and additional space that is not needed. The OID is needed to propagate the new entry id to Serendipity Forms and Session variables and to return it via XML-RPC if asked for.

And of course it works in all other SQL systems like that :-)

Regards ...
by LER
Wed Feb 16, 2005 1:52 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

The only thing to let us not depend on OIDs is a way to get the last insert id form a 'INSERT INTO' statement. If OIDs are deprectated by postgresql, what do they prefer instead to get the last insert id?

I'll add that 'set oid' statement to our SQL, thanks!

Regards,
Garvin If the table doesn't ...
by LER
Wed Feb 16, 2005 1:21 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

You could also add:

Code: Select all

SET default_with_oids = true;
to the PostgreSQL db.sql (for at least >= 8.0, but maybe 7.4 as well).
by LER
Wed Feb 16, 2005 1:02 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

Ok, I recreated your database adding WITH OIDS to each CREATE TABLE, and it does, in fact, fix the issue.

I'm firmly of the belief that DEPENDING on OIDS is a mistake, and should be looked into.

(OID's are a "scarce" resource).

How can I assist more?
by LER
Wed Feb 16, 2005 12:54 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429


But yes, we need OIDs for tables. We need to get the last inserted ID with some way. MySQL does this via a PHP mysql_insert_id() function, SQLite does it via PHP sqlite_last_insert_rowid() function.

Surely PostgreSQL supports something similar and I only don't know about it? In your case you will ...
by LER
Wed Feb 16, 2005 12:17 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

One thing I just thought of. I have "default_with_oids" set to FALSE, which means you
don't get an OID for every row.

Since the PostgreSQL folks are trying to move away from OID's on every row, this is a good thing.

Do you depend on OID's for each row of your tables?

If so, you may need to add ...
by LER
Wed Feb 16, 2005 12:03 pm
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

Works fine:


$ psql serendipity
Welcome to psql 8.0.1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

serendipity=# INSERT INTO serendipity ...
by LER
Wed Feb 16, 2005 11:56 am
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

the log is at:

http://www.lerctr.org/~ler/pgsql.log

this is with PHP 4.3.11-DEV and PGSQL 8.0.1
by LER
Wed Feb 16, 2005 1:31 am
Forum: Bugs
Topic: s9y_200502151337: Get error with Postgres on new entry
Replies: 15
Views: 15429

s9y_200502151337: Get error with Postgres on new entry

I'm a noobie, but like to help find bugs :)

Whenever I add a new entry, I get the following:



Warning: pg_query(): Query failed: ERROR: syntax error at end of input at character 46 in /home/ler/serendipity/include/db/postgres.inc.php on line 83

Warning: pg_num_rows(): supplied argument is not ...