Re: [GENERAL] How to define the limit length for numeric type?

2017-03-13 Thread vod vos
Sorry for taking varchar(4) as an example, What I want urgently is how to make a constraint of fixed length of a numeric data, that you can only input data like 23.45, and if you input the data like 2.45, 23.4356, 233.45, you will get a warning message from postgresql. I think expr will do th

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-13 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of vod vos > Sent: Montag, 13. März 2017 15:52 > To: rob stone > Cc: pgsql-general > Subject: Re: [GENERAL] How to define the limit length for numeric type? > >

Re: [GENERAL] How to define the limit length for numeric type?

2017-03-13 Thread David G. Johnston
On Mon, Mar 13, 2017 at 7:51 AM, vod vos wrote: > Sorry for taking varchar(4) as an example, What I want urgently is how to > make a constraint of fixed length of a numeric data, > that you can only input data like 23.45, and if you input the data like > 2.45, 23.4356, 233.45, you will get a war

[GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Schmid Andreas
Hi I'm trying to add a new DB user with the following command from my client machine: createuser -h my.host.name -U mysuperusername --pwprompt newusername I'm getting the following message: createuser: could not connect to database postgres: FATAL: no pg_hba.conf entry for host "10.0.0.1", use

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Guillaume Lelarge
2017-03-13 16:29 GMT+01:00 Schmid Andreas : > Hi > > I'm trying to add a new DB user with the following command from my client > machine: > createuser -h my.host.name -U mysuperusername --pwprompt newusername > > I'm getting the following message: > createuser: could not connect to database postgr

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Tom Lane
Schmid Andreas writes: > I'm trying to add a new DB user with the following command from my client > machine: > createuser -h my.host.name -U mysuperusername --pwprompt newusername > I'm getting the following message: > createuser: could not connect to database postgres: FATAL: no pg_hba.conf

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Adrian Klaver
On 03/13/2017 08:44 AM, Guillaume Lelarge wrote: 2017-03-13 16:29 GMT+01:00 Schmid Andreas mailto:andreas.sch...@bd.so.ch>>: Hi I'm trying to add a new DB user with the following command from my client machine: createuser -h my.host.name -U mysuperusername

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Guillaume Lelarge
2017-03-13 16:57 GMT+01:00 Adrian Klaver : > On 03/13/2017 08:44 AM, Guillaume Lelarge wrote: > >> 2017-03-13 16:29 GMT+01:00 Schmid Andreas > >: >> >> Hi >> >> I'm trying to add a new DB user with the following command from my >> client machine: >>

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Adrian Klaver
On 03/13/2017 08:52 AM, Tom Lane wrote: Schmid Andreas writes: I'm trying to add a new DB user with the following command from my client machine: createuser -h my.host.name -U mysuperusername --pwprompt newusername I'm getting the following message: createuser: could not connect to database

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Tom Lane
Guillaume Lelarge writes: > It's not very hard to do. But I really wonder why it's not already done. I > fear there was a good idea, but I fail to see which one :) The core reason why we haven't complicated createuser in that particular direction is that createuser is only a convenience function

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Guillaume Lelarge
2017-03-13 17:10 GMT+01:00 Tom Lane : > Guillaume Lelarge writes: > > It's not very hard to do. But I really wonder why it's not already done. > I > > fear there was a good idea, but I fail to see which one :) > > The core reason why we haven't complicated createuser in that particular > directio

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Tom Lane
Adrian Klaver writes: > On 03/13/2017 08:52 AM, Tom Lane wrote: >> If by "history" you're worried about the server-side statement log, this >> is merest fantasy: the createuser program is not magic, it just constructs >> and sends a CREATE USER command for you. You'd actually be more secure >> us

Re: [GENERAL] createuser: How to specify a database to connect to

2017-03-13 Thread Adrian Klaver
On 03/13/2017 09:19 AM, Tom Lane wrote: Adrian Klaver writes: On 03/13/2017 08:52 AM, Tom Lane wrote: If by "history" you're worried about the server-side statement log, this is merest fantasy: the createuser program is not magic, it just constructs and sends a CREATE USER command for you. Yo

[GENERAL] DELETE and JOIN

2017-03-13 Thread Alexander Farber
Good evening, In a 9.5 database I would like players to rate each other and save the reviews in the table: CREATE TABLE words_reviews ( uid integer NOT NULL CHECK (uid <> author) REFERENCES words_users ON DELETE CASCADE, author integer NOT NULL REFERENCES words_users(uid) ON DELET

Re: [GENERAL] DELETE and JOIN

2017-03-13 Thread Tom Lane
Alexander Farber writes: > ... > However, before saving a review, I would like to delete all previous > reviews coming from the same IP in the past 24 hours: > ... > I have the feeling that the _author_ip variable is not really necessary and > I could use some kind of "DELETE JOIN" here, but can n

Re: [GENERAL] DELETE and JOIN

2017-03-13 Thread Adrian Klaver
On 03/13/2017 09:39 AM, Alexander Farber wrote: Good evening, In a 9.5 database I would like players to rate each other and save the reviews in the table: CREATE TABLE words_reviews ( uid integer NOT NULL CHECK (uid <> author) REFERENCES words_users ON DELETE CASCADE, author int

Re: [GENERAL] DELETE and JOIN

2017-03-13 Thread David G. Johnston
On Mon, Mar 13, 2017 at 9:39 AM, Alexander Farber < alexander.far...@gmail.com> wrote: > Good evening, > > In a 9.5 database I would like players to rate each other and save the > reviews in the table: > > CREATE TABLE words_reviews ( > uid integer NOT NULL CHECK (uid <> author) REFERENCES

[GENERAL] Large and Growing Group of Files

2017-03-13 Thread John Iliffe
Can anybody tell what these files are and what they do, and more importantly if they are needed? This database has been in use since about 2012 on PostgreSQL 9.2 and is quite active. (both read and insert/change). There seems to be one group of these files a week, total 316 files as of today

Re: [GENERAL] Large and Growing Group of Files

2017-03-13 Thread Tom Lane
John Iliffe writes: > Can anybody tell what these files are and what they do, and more importantly > if they are needed? They are database table files, and you will certainly be unhappy if you just manually rm them. You can read some theory here: https://www.postgresql.org/docs/9.2/static/stor

Re: [GENERAL] Large and Growing Group of Files

2017-03-13 Thread David G. Johnston
On Mon, Mar 13, 2017 at 4:12 PM, Tom Lane wrote: > John Iliffe writes: > > Can anybody tell what these files are and what they do, and more > importantly > > if they are needed? > > They are database table files, and you will certainly be unhappy if you > just manually rm them. > > You can read

Re: [GENERAL] Large and Growing Group of Files

2017-03-13 Thread John Iliffe
On Monday 13 March 2017 19:12:10 Tom Lane wrote: > John Iliffe writes: > > Can anybody tell what these files are and what they do, and more > > importantly if they are needed? > > They are database table files, and you will certainly be unhappy if you > just manually rm them. > > You can read so

Re: [GENERAL] Recovery damaged dump file

2017-03-13 Thread mac pack
2017-03-10 14:58 GMT+00:00 Adrian Klaver : > On 03/10/2017 01:25 AM, mac pack wrote: > >> >> 2017-03-10 5:11 GMT+00:00 Adrian Klaver > >: >> >> >> On 03/09/2017 09:09 PM, Adrian Klaver wrote: >> >> On 03/09/2017 03:55 AM, mac pack wrote: >> >>

[GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Raffaele Irlanda
Hello People of PostgreSQL, Unfortunately only nowadays (March 2017), and only by chance I spotted this 2010 discussion during a Google search. Name of discussion: Wikipedia entry - AmigaOS port - error? id of message: https://www.postgresql.org/message-id/839805.58072.qm%40web23603.mail.ird.y

Re: [GENERAL] Recovery damaged dump file

2017-03-13 Thread Michael Paquier
On Mon, Mar 13, 2017 at 7:40 PM, mac pack wrote: > Any one knows how pg_dump saves the dump in custom format. What is the > structure of the format, there is any doc about that? There are no docs, but the code in src/bin/pg_dump/pg_backup_custom.c can speak by itself if you are willing to know wh

Re: [GENERAL] general erros backup

2017-03-13 Thread Adrian Klaver
On 03/12/2017 11:30 AM, sttefaniribe...@yahoo.com.br wrote: I can’t resolve this problema with backup configuration. Can you help me? Not really as I see no useful error message. What happens if you run the command in a terminal? Enviado do Email

Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Adrian Klaver
On 03/13/2017 02:13 AM, Raffaele Irlanda wrote: Hello People of PostgreSQL, Unfortunately only nowadays (March 2017), and only by chance I spotted this 2010 discussion during a Google search. Name of discussion: Wikipedia entry - AmigaOS port - error? id of message: https://www.postgresql.or

Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Scott Marlowe
On Mon, Mar 13, 2017 at 10:41 PM, Adrian Klaver wrote: > On 03/13/2017 02:13 AM, Raffaele Irlanda wrote: >> http://aminet.net/package/dev/gg/postgresql632-mos-bin >> >> In 2010 it has been sure completely outdated but sure you can see proof >> it exists, and that Amiga had full dignity of being p

Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Tom Lane
Scott Marlowe writes: > On Mon, Mar 13, 2017 at 10:41 PM, Adrian Klaver > wrote: >> I am pretty sure it is: >> https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support >> PostgreSQL Yes Yes Yes Yes Yes Yes (MorphOS)[24]

Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread John R Pierce
On 3/13/2017 10:06 PM, Scott Marlowe wrote: I am pretty sure it is: https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support PostgreSQL Yes Yes Yes Yes Yes Yes (MorphOS)[24] Oh man, 2005's versuin 6.3.2. It's more of

Re: [GENERAL] PostgreSQL general discussions list - 2010 Thread: Wikipedia entry - AmigaOS port - error?

2017-03-13 Thread Scott Marlowe
On Mon, Mar 13, 2017 at 11:15 PM, John R Pierce wrote: > On 3/13/2017 10:06 PM, Scott Marlowe wrote: > > I am pretty sure it is: > > https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Operating_system_support > > PostgreSQL Yes Yes Yes Yes Yes