db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: How to define Blob Field/Postgresql
Date Wed, 15 Jun 2005 06:27:50 GMT





Hi,

Two possible solutions:
1) use BINARY instead of BLOB for postgresql.
2) locate the file templates/sql/base/postgresql/db.props in the generator
and replace the line
BLOB =
by
BLOB = BLOB

     Thomas

"Ferruh Zamangoer" <ferruh.zamangoer@gmx.de> schrieb am 14.06.2005
16:03:08:

> Hi,
>
>
>
> I have now installed my postgresql database and it works.  I had noticed
> that in the generation of the sql script was an error. I have defined in
> schema.xml some fields, which are from type BLOB.
>
>
>
> <table name="WHITE_LIST" description="WHITE LIST TABLE"
>
>   javaNamingMethod="underscore">
>
> <column
>
>   name="ENTRY_ID"
>
>   required="true"
>
>   primaryKey="true"
>
>   type="INTEGER"
>
>   description="ENTRY_ID"/>
>
> <column
>
>   name="CONTENT_ID"
>
>   required="true"
>
>   type="BLOB"
>
>   description="CONTENT_ID"/>
>
> ……….
>
> </table>
>
>
>
> In the sql script I saw that no type is set for the CONTENT_ID Field
>
>
>
> CREATE TABLE WHITE_LIST
>
> (
>
>                                     ENTRY_ID integer DEFAULT
> nextval('WHITE_LIST_SEQ') NOT NULL,
>
>                                     CONTENT_ID NOT NULL,
>
>                                     HASH_VALUE integer NOT NULL,
>
>                                     CONTENT_ID_TYPE varchar (256) NOT
NULL,
>
>                                       -- REFERENCES CONTENT
> (CONTENT_REGISTRATION_ID)
>
>     CONTENT_REGISTRATION_ID integer NOT NULL,
>
>                                     DATE date NOT NULL,
>
>                                     DESCRIPTION varchar (256),
>
>     PRIMARY KEY (ENTRY_ID)
>
> );
>
>
>
> Which type I have to set in schema that the sql script sets the right
data
> type?´
>
>
>
> I had edit manually the script and set bytea which is blob field in
> postgresql.
>
>
>
> Can anybody help?
>
>
>
> Regards
>
> Ferruh
>
Mime
View raw message