1,234
edits
Changes
no edit summary
{{Admon/obsolete}}
<big><big> PostgreSQL Adapter for NexJ - Working Inside Schema 'test' </big></big>
* ''PostgreSQLAdapter.java''
: When a connection is first established, this initial SQL statement should execute in MySQL, which is not the case for PostgreSQL, so the implementation was removed from PostgreSQLAdapter.java:
</source>
* ''postgresql_create.sql''
: Also This file was just created as a copy of mysql_create.sql, which was not the case for PostgreSQL again. So the same line should in the file is removed for now. The file itself may be commented out in postgresql_createdeleted later, if there was no need for it.sql Name of the script, which file is being used to create tables returned in '''''getCreateEtcScriptName()'''''' in the database 'test':'PostgreSQLSchemaManager.java'''
::
<source lang=java>
: After activating the connection, the database is locked.
<source lang=java>
/* MySQL version of creating table script */
create table test.RangeTest(
id int auto_increment not null, s varchar(1) character set utf8 null, bin varbinary(1) null,
)engine=InnoDB character set = utf8
</source>
<source lang=java>
/* PostgreSQL version of creating table script */
CREATE TABLE test.RangeTest(
id integer serial not null, s text null, bin bytea null,
n integer null, n1 smallint null, l bigint null, "DEC" decimal(10,5) null,
f double precision null, d double precision null, tm timestamp null, b boolean null,
constraint RangeTest_PK primary key(id)
);
// Using SERIAL is another way to work around 'sequence'//CREATE SEQUENCE test.RangeTest_id_seq;//ALTER TABLE test.RangeTest ALTER COLUMN id SET DEFAULT NEXTVAL('test.RangeTest_id_seq');
</source>
: Script - scripts are being processed through SQLDataTest.java
:: postgresql_setuppostgresql_insert.sql:: TO be cond'|}