Il giorno venerdì 4 gennaio 2013 21:00:56 UTC+1, Peter Ertl ha scritto:
>
> Hello folks,
>
> I have a table that contains a INET column:
>
> CREATE TABLE backend_registration (
> id BIGSERIAL NOT NULL PRIMARY KEY,
> password_hash TEXT NOT NULL,
> confirmation_token TEXT,
> created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
> created_ip INET);
>
> However I can't get how to insert an address into column 'created_ip'
>
> factory.insertInto(REGISTRATION)
> .set(REGISTRATION.EMAIL, "[email protected] <javascript:>")
> .set(REGISTRATION.PASSWORD_HASH, "2304820984309238409237428739")
> .set(REGISTRATION.CREATED_IP, "::1")
> .execute();
>
> ^ this does not work and I get the following error:
>
> >> ERROR: column "created_ip" is of type inet but expression is of type
> character varying
> >> Hint: You will need to rewrite or cast the expression.
>
> Is there a way to solve this issues?
>
> Should type INET be supported by jooq natively?
>
> Cheers
> Peter
>
Hi, in the make a select or insert o update so...
String query="INSERT INTO NAME_TABLE (NAME_FIELDS1, NAME_FIELDS2) VALUES
('" + value_field1 + "'::inet, '"" + value_field2 + "'::inet)";
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.