The bug appears, when Links SQL is used together with PostgreSQL database.
(Bug appeared under following versions: Links SQL version 2.1.2, PostgreSQL 7.2.1)
An error appears, when a new field is added manually by the user, to Category table.
The error is the following:
'ALTER TABLE lsql_Category ADD DirName VARCHAR(255) NOT NULL'
Reason: ERROR: Adding NOT NULL columns is not implemented.
I digged a bit on the net, and seems there were no NOT NULL feature implemented into ALTER TABLE, before PostgreSQL version 7.3.
Below 7.3 NOT NULL is not implemented in ALTER TABLE.
From 7.3 and above, it is implemented using the following syntax:
(Note the SET command)
Well, it is not a problem, but this should be threated correctly by PostgreSQL DBD driver in Links SQL. Unfortunately nor the version difference, nor the SET command is not implemented. So the bug is in GT/SQL/Driver/PG.pm.
URLs related to this problem:
http://archives.postgresql.org/...2002-10/msg00249.php
http://developer.postgresql.org/...tgres/ddl-alter.html
EDIT: I also found a very useful page, which gives useful info about updating PostgreSQL tables:
http://techdocs.postgresql.org/.../updatingcolumns.php
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
(Bug appeared under following versions: Links SQL version 2.1.2, PostgreSQL 7.2.1)
An error appears, when a new field is added manually by the user, to Category table.
The error is the following:
Code:
Unable to add column 'DirName'. Reason: Failed to execute query: 'ALTER TABLE lsql_Category ADD DirName VARCHAR(255) NOT NULL'
Reason: ERROR: Adding NOT NULL columns is not implemented.
I digged a bit on the net, and seems there were no NOT NULL feature implemented into ALTER TABLE, before PostgreSQL version 7.3.
Below 7.3 NOT NULL is not implemented in ALTER TABLE.
From 7.3 and above, it is implemented using the following syntax:
Code:
ALTER TABLE tablename ALTER COLUMN columnname SET NOT NULL;Well, it is not a problem, but this should be threated correctly by PostgreSQL DBD driver in Links SQL. Unfortunately nor the version difference, nor the SET command is not implemented. So the bug is in GT/SQL/Driver/PG.pm.
URLs related to this problem:
http://archives.postgresql.org/...2002-10/msg00249.php
http://developer.postgresql.org/...tgres/ddl-alter.html
EDIT: I also found a very useful page, which gives useful info about updating PostgreSQL tables:
http://techdocs.postgresql.org/.../updatingcolumns.php
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...