Please don't top-post on these lists.
On Sun, Mar 12, 2017 at 12:00 AM, vod vos wrote:
> Maybe CHECK (goose >= 100 AND goose <= -100) works better, But if :
>
> INSERT INTO test VALUES (1, 59.2);
> INSERT INTO test VALUES (1, 59.24);
> INSERT INTO test VALUES (1, 59.26);
>
Hello
> -Original Message-
> From: pgsql-general-ow...@postgresql.org
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of vod vos
> Sent: Sonntag, 12. März 2017 08:01
> To: Pavel Stehule
> Cc: pgsql-general
> Subject: Re:
Maybe CHECK (goose >= 100 AND goose <= -100) works better, But if :
INSERT INTO test VALUES (1, 59.2);
INSERT INTO test VALUES (1, 59.24);
INSERT INTO test VALUES (1, 59.26);
INSERT INTO test VALUES (1, 59.2678);
The INSERT action still can be done. What I want is just how to limit the
length
On Sat, Mar 11, 2017 at 11:14 PM, vod vos wrote:
>
> Hi everyone,
>
> How to define the exact limit length of numeric type? For example,
>
> CREATE TABLE test (id serial, goose numeric(4,1));
>
> [...]
> 30.2 can be inserted into COLUMN goose, but I want 30.2
> [...]
> can
2017-03-12 7:25 GMT+01:00 Pavel Stehule :
>
>
> 2017-03-12 7:14 GMT+01:00 vod vos :
>
>>
>> Hi everyone,
>>
>> How to define the exact limit length of numeric type? For example,
>>
>> CREATE TABLE test (id serial, goose numeric(4,1));
>>
>> 300.2 and
2017-03-12 7:14 GMT+01:00 vod vos :
>
> Hi everyone,
>
> How to define the exact limit length of numeric type? For example,
>
> CREATE TABLE test (id serial, goose numeric(4,1));
>
> 300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2 or 3.2
> can not be inserted,
## vod vos (vod...@zoho.com):
> How to define the exact limit length of numeric type? For example,
>
> CREATE TABLE test (id serial, goose numeric(4,1));
>
> 300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2
> or 3.2 can not be inserted, how to do this?
testing=# CREATE TABLE
Hello
> -Original Message-
> From: pgsql-general-ow...@postgresql.org
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of vod vos
> Sent: Sonntag, 12. März 2017 07:15
> To: pgsql-general
> Subject: [GENERAL] How to define the limit length for numeric
Hi everyone,
How to define the exact limit length of numeric type? For example,
CREATE TABLE test (id serial, goose numeric(4,1));
300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2 or 3.2 can
not be inserted, how to do this?
Thank you.
--
Sent via pgsql-general mailing
On 3/11/2017 3:55 PM, SuperCiccio wrote:
Is there a way to make the following query use some sort of indexing?
select field1,field2 from datatable where
(jsonfield#>>'{path1,path2}')::numeric < 1000;
if the '{path1,path2}' part is constant, I'd think you could create an
index on (jsonfield
Is there a way to make the following query use some sort of indexing?
select field1,field2 from datatable where
(jsonfield#>>'{path1,path2}')::numeric < 1000;
Thanks
Thank you Alban and Francisco -
On Sat, Mar 11, 2017 at 11:52 AM, Alban Hertroys wrote:
>
> > On 11 Mar 2017, at 10:41, Alexander Farber
> wrote:
> > uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE
> On 11 Mar 2017, at 10:41, Alexander Farber wrote:
>
> uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE CASCADE,
> but get syntax error in 9.5:
>
> ERROR: syntax error at or near "ON"
> LINE 2: ...REFERENCES
Alexander:
On Sat, Mar 11, 2017 at 10:41 AM, Alexander Farber
wrote:
> uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
> author) ON DELETE CASCADE,
Maybe a stupid question, but have you tried "refereces.. on delete .. check"?
I mean, the
Good morning,
I am trying to add a table holding player reviews of each other:
words=> CREATE TABLE words_reviews (
uid integer NOT NULL REFERENCES words_users(uid) CHECK (uid <>
author) ON DELETE CASCADE,
author integer NOT NULL REFERENCES words_users(uid) ON DELETE
CASCADE,
15 matches
Mail list logo