Re: [GENERAL] pg_bulkload

2015-06-11 Thread Takashi Ohnishi
Hi, I am a maintainer of pg_bulkload. I'm sorry but now we do not have a plan to support 9.4 on Windows. Regards, Takashi Ohnishi From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Nguyen, Phuonglan H. Sent: Friday, June 12, 2015 3:0

Re: [GENERAL] localtime ?

2015-06-11 Thread Adrian Klaver
On 06/11/2015 04:48 PM, James Cloos wrote: "TL" == Tom Lane writes: TL> AFAIK, [localtime] is not a valid value for timezone, unless someone TL> has stuck a file by that name into your zoneinfo database directory TL> (which I think is standard practice on some distros though by no TL> means al

Re: [GENERAL] localtime ?

2015-06-11 Thread James Cloos
> "TL" == Tom Lane writes: TL> AFAIK, [localtime] is not a valid value for timezone, unless someone TL> has stuck a file by that name into your zoneinfo database directory TL> (which I think is standard practice on some distros though by no TL> means all). If so, it would mean whatever the f

Re: [GENERAL] localtime ?

2015-06-11 Thread Tom Lane
James Cloos writes: > On one of my servers, even thopugh everything is in UTC, pg insists on > using timezone -04 by default. > | cloos=# SELECT current_setting('TIMEZONE'); > | current_setting > | - > | localtime > | (1 row) AFAIK, that is not a valid value for timezone, unle

[GENERAL] localtime ?

2015-06-11 Thread James Cloos
On one of my servers, even thopugh everything is in UTC, pg insists on using timezone -04 by default. Eg: , | :; date | Thu Jun 11 22:31:51 UTC 2015 | | :; psql | psql (9.4.3, server 9.3.4) | Type "help" for help. | | cloos=# SELECT current_setting('TIMEZONE'); | current_setting | ---

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asif Naeem
On Fri, Jun 12, 2015 at 12:29 AM, Tom Lane wrote: > Asma Riyaz writes: > > in bashrc:- > > > LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib > > > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib > > If you didn't have an "export LD_LIBRARY_PATH" in there, I don't >

Re: [GENERAL] Alter column from text[] to uuid[]

2015-06-11 Thread Tom Lane
Keith Rarick writes: > I recently did the following: > kr=# alter table t alter u type text[]; > ALTER TABLE > Time: 5.513 ms > Now I'd like to put it back the way it was, but my attempts didn't work: > kr=# alter table t alter u type uuid[]; > ERROR: column "u" cannot be cast automatically to

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asma Riyaz
Hi everyone... I think libmpfr.so.4 is being searched for in the /../software/free/Linux/ redhat_6_x86_64/pkgs/gcc_4.9.0/libexec (according to error message) directory but on our system it is located in /../software/free/Linux/ redhat_6_x86_64/pkgs/gcc_4.9.0/lib Any idea how I can specify as to w

Re: [GENERAL] Alter column from text[] to uuid[]

2015-06-11 Thread Adrian Klaver
On 06/11/2015 11:33 AM, Keith Rarick wrote: I have a table: kr=# create table t (u uuid[]); CREATE TABLE Time: 3.742 ms kr=# insert into t values ('{"0289b709-3cd7-431c-bcbe-f942eb31b4c5","86cc14d6-7293-488e-a85f-384ae6773d28"}'); INSERT 0 1 Time: 1.735 ms I recently did the following: kr=# al

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread John R Pierce
On 6/11/2015 7:20 AM, Asma Riyaz wrote: I have seen an earlier post with gcc errors, however I couldn't figure out what the actual problem here is: is it that libmpfr.so.4 is not found? or gcc needs to be installed fresh? on RHEL7/CentOS 7, that library is provided by the package mpfr... ask

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asma Riyaz
Hi Jimmy, I checked linkage with ldd: ldd /path/to/cc1 Here is the result: linux-vdso.so.1 => (0x7fffed53f000) libmpfr.so.4 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0/lib/libmpfr.so.4 (0x7f264f304000) libgmp.so.10 => /../software/free/Linux/redhat_6_x86_64/pkgs/gcc_4.9.0

[GENERAL] Alter column from text[] to uuid[]

2015-06-11 Thread Keith Rarick
I have a table: kr=# create table t (u uuid[]); CREATE TABLE Time: 3.742 ms kr=# insert into t values ('{"0289b709-3cd7-431c-bcbe-f942eb31b4c5","86cc14d6-7293-488e-a85f-384ae6773d28"}'); INSERT 0 1 Time: 1.735 ms I recently did the following: kr=# alter table t alter u type text[]; ALTER TABLE T

[GENERAL] pg_bulkload

2015-06-11 Thread Nguyen, Phuonglan H.
I was wondering when pg_bulkload will be available for PostgresSQL 9.4 on Windows? Thank you, Fawn Nguyen DBA

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Tom Lane
Asma Riyaz writes: > in bashrc:- > LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib If you didn't have an "export LD_LIBRARY_PATH" in there, I don't think this would do anything. But your real problem is you have a

Re: [GENERAL] database-level lockdown

2015-06-11 Thread Tom Lane
Filipe Pina writes: > It will try 5 times to execute each instruction (in case of > OperationError) and in the last one it will raise the last error it > received, aborting. > Now my problem is that aborting for the last try (on a restartable > error - OperationalError code 40001) is not an op

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Jimmy Yih
Hey Asma, Did you check the linkage with ldd? For example on my blank RHEL 6.5 AWS VM using gcc 4.4.7: [jyih@test1 ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1 linux-vdso.so.1 => (0x7fff9b9ff000) libmpfr.so.1 => /usr/lib64/libmpfr.so.1 (0x0033b840) libgmp.so.3

[GENERAL] database-level lockdown

2015-06-11 Thread Filipe Pina
[ original question posted in http://stackoverflow.com/questions/30789279/django-postgresql-retry-transaction-last-try-must-go-in for easier read ] I have a Django+PostgreSQL. For data integrity pg is setup for serializable transactions, so I'm retrying the transaction (in a generic class) as:

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asma Riyaz
Hi Jimmy, Here is what I did upon your suggestion; in bashrc:- LD_LIBRARY_PATH=/seq/annotation/bio_tools/BOOST/boost_1_46_1/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/seq/regev_genome_portal/lib sourced it and then exceuted /.configure as below: ./configure --prefix=/../../DATABASE/postgres I get

Re: [HACKERS] [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-06-11 Thread Jeff Janes
On Wed, Jun 10, 2015 at 7:16 PM, Noah Misch wrote: > On Mon, Jun 08, 2015 at 03:15:04PM +0200, Andres Freund wrote: > > One more thing: > > Our testing infrastructure sucks. Without writing C code it's basically > > impossible to test wraparounds and such. Even if not particularly useful > > for

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Jimmy Yih
Hey Asma, Have you tried running ldd and checking the library linkage? You might be able to just add the different location to your LD_LIBRARY_PATH as a quick way to get this working. - Jimmy On Thu, Jun 11, 2015 at 7:46 AM, Asma Riyaz wrote: > I have a libmpfr.so.4 under a different location

Re: [GENERAL] Random order by but first 3

2015-06-11 Thread David G. Johnston
On Thu, Jun 11, 2015 at 12:35 PM, Arup Rakshit wrote: > Hi, > > Suppose I have a column t1 for a table. Now t1 holds some numerice value > for each row. Say R1 to R5 records has values for the column t1 as : > > t1(2,5,8,10,32) > > I want the result to be printed as (10, 32, 8, 2, 5) means - Big,

Re: [GENERAL] SET LOCAL synchronous_commit TO OFF

2015-06-11 Thread Thom Brown
On 11 June 2015 at 17:34, Robert DiFalco wrote: > I want to make sure I understand the repercussions of this before making it > a global setting. > > As far as I can tell this will put data/referential integrity at risk. It > only means that there is a period of time (maybe 600 msecs) between when

[GENERAL] Random order by but first 3

2015-06-11 Thread Arup Rakshit
Hi, Suppose I have a column t1 for a table. Now t1 holds some numerice value for each row. Say R1 to R5 records has values for the column t1 as : t1(2,5,8,10,32) I want the result to be printed as (10, 32, 8, 2, 5) means - Big, Biggest, small , Regards, Arup Rakshit -- Sent via pgsql-ge

[GENERAL] SET LOCAL synchronous_commit TO OFF

2015-06-11 Thread Robert DiFalco
I want to make sure I understand the repercussions of this before making it a global setting. As far as I can tell this will put data/referential integrity at risk. It only means that there is a period of time (maybe 600 msecs) between when a commit occurs and when that data is safe in the case of

[GENERAL] Installing Postgres manually GCC error and libmpfr.so.4 not found

2015-06-11 Thread asmariyaz23
Hi, Due to a root access permissions I have to resort to manually installing postgres from source code available under the ftp site. When I execute ./configure --prefix="dir/path"- my config log shows the following error: gcc version 4.9.0 (GCC) configure:3817: $? = 0 configure:3806: gcc -V >&5 g

Re: [GENERAL] Prevent roles not having admin option from granting themselves to other roles

2015-06-11 Thread Adrian Klaver
On 06/11/2015 07:55 AM, Charles Clavadetscher wrote: Hello Well I was thinking a litte more on this. Basically I think that it could end up with a small set of "rules": - Organize privileges in groups (nologin, inherit) is a way that independently of how many levels of indirection you have each

Re: [GENERAL] Prevent roles not having admin option from granting themselves to other roles

2015-06-11 Thread Charles Clavadetscher
Hello Well I was thinking a litte more on this. Basically I think that it could end up with a small set of "rules": - Organize privileges in groups (nologin, inherit) is a way that independently of how many levels of indirection you have each definite scope or application has a single group to "s

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asma Riyaz
I have a libmpfr.so.4 under a different location, which setting in configure should I use so that it uses the required library from that directory? I have used ./configure --prefix=/path/directory LIB=/path/to/libmpfr.so.4 but the config.log still shows that its looking for libmpfr.so.4 under the

Re: [GENERAL] select count(*);

2015-06-11 Thread Marc Mamin
> -Original Message- > From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] > Sent: Donnerstag, 11. Juni 2015 16:31 > To: Marc Mamin; 'Geoff Winkless'; Postgres General > Subject: Re: [GENERAL] select count(*); > > On 06/11/2015 07:17 AM, Marc Mamin wrote: > >>> That's the point. * has

Re: [GENERAL] select count(*);

2015-06-11 Thread Geoff Winkless
On 11 June 2015 at 15:35, Yves Dorfsman wrote: > On 2015-06-11 08:20, Geoff Winkless wrote: > > On 11 June 2015 at 15:17, Marc Mamin > >wrote: > > > > >But COUNT(*) > > > > > >does have meaning - it means "the number of rows". > > > > which rows? :-)

Re: [GENERAL] select count(*);

2015-06-11 Thread Adrian Klaver
On 06/11/2015 07:17 AM, Marc Mamin wrote: That's the point. * has no meaning without FROM But COUNT(*) does have meaning - it means "the number of rows". which rows? :-) To follow up on the post from Chris Mair: test=> select count(*), 'foo'; count | ?column? ---+-- 1

Re: [GENERAL] select count(*);

2015-06-11 Thread Francisco Olarte
Hi Marc: On Thu, Jun 11, 2015 at 4:17 PM, Marc Mamin wrote: >>But COUNT(*) >>does have meaning - it means "the number of rows". > which rows? :-) Well, docs could use a little polish there, as the select page says """ Compatibility Of course, the SELECT statement is compatible with the SQL sta

Re: [GENERAL] select count(*);

2015-06-11 Thread Yves Dorfsman
On 2015-06-11 08:20, Geoff Winkless wrote: > On 11 June 2015 at 15:17, Marc Mamin >wrote: > > >But COUNT(*) > > > >does have meaning - it means "the number of rows". > > which rows? :-) > > > ​The number of rows in the query, as well you know :) B

Re: [GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Geoff Winkless
On 11 June 2015 at 15:20, Asma Riyaz wrote: > I have seen an earlier post with gcc errors, however I couldn't figure out > what the actual problem here is: is it that libmpfr.so.4 is not found? or > gcc needs to be installed fresh? > libmpfr. Unless I've misunderstood, the other errors are simpl

Re: [GENERAL] Prevent roles not having admin option from granting themselves to other roles

2015-06-11 Thread Charles Clavadetscher
Hello Adrian Thank you very much for your response. As a matter of fact I already had a look into the NOINHERIT attribute and its consequences. This partially solves the problem but makes the usage of user accounts in applications more complex. If I wanted to create a group for accessing the data

Re: [GENERAL] select count(*);

2015-06-11 Thread Tom Lane
Marc Mamin writes: >> The * might be a bit tricky, though, >> since 'select *;' doesn't work. > That's the point. * has no meaning without FROM PG regards "count(*)" as a weird spelling of "count()", ie, invoke an aggregate that takes no arguments. It really doesn't have anything to do with the

Re: [GENERAL] select count(*);

2015-06-11 Thread Geoff Winkless
On 11 June 2015 at 15:17, Marc Mamin wrote: > >But COUNT(*) > > > >does have meaning - it means "the number of rows". > > which rows? :-) ​The number of rows in the query, as well you know :) The reason you can't SELECT *; is because there's no way of defining what "*" refers to in this instan

[GENERAL] GCC error and libmpfr.so.4 not found

2015-06-11 Thread Asma Riyaz
Hi, Due to root access permissions I have to resort to manually installing postgres from source code available under the ftp site. When I execute ./configure --prefix="dir/path"- my config log shows the following error: gcc version 4.9.0 (GCC) configure:3817: $? = 0 configure:3806: gcc -V >&5 gcc

Re: [GENERAL] select count(*);

2015-06-11 Thread Marc Mamin
>>That's the point. * has no meaning without FROM >But COUNT(*) > >does have meaning - it means "the number of rows". which rows? :-) > It's not counting the number of columns in the row, so postgres doesn't need > to know what columns exist in the row to return a row count. >Geoff -- Sen

Re: [GENERAL] select count(*);

2015-06-11 Thread Geoff Winkless
On 11 June 2015 at 15:05, Marc Mamin wrote: > That's the point. * has no meaning without FROM > ​ But COUNT(*) *​​does* have meaning - it means "the number of rows". ​ It's not counting the number of columns in the row, so postgres doesn't need to know what columns exist in the row to return a r

Re: [GENERAL] Planner cost adjustments

2015-06-11 Thread Francisco Olarte
Hi Daniel: On Thu, Jun 11, 2015 at 2:38 PM, Daniel Begin wrote: . > The remaining problem seems related to the statistics of some large tables. > On one hand, I might increase the statistic target for these tables to 500, > or even to 1000 and look at the results (but I have doubts it will he

Re: [GENERAL] select count(*);

2015-06-11 Thread Marc Mamin
> > select *; > > -- > > ERROR: SELECT * with no tables specified is not valid > > > > select count(*); > > > > 1 > > > > Is this a must? and why 1? > > Hi, > > regarding the "why 1" part: > > I think that if we accept that > > chris=> select 'foo'; > ?column? > -

Re: [GENERAL] select count(*);

2015-06-11 Thread Chris Mair
> select *; > -- > ERROR: SELECT * with no tables specified is not valid > > select count(*); > > 1 > > Is this a must? and why 1? Hi, regarding the "why 1" part: I think that if we accept that chris=> select 'foo'; ?column? -- foo (1 row) returns 1 row, t

[GENERAL] select count(*);

2015-06-11 Thread Marc Mamin
Hello, select *; -- ERROR: SELECT * with no tables specified is not valid select count(*); 1 Is this a must? and why 1? It may lead to uncatched issues by typos. e.g.: select count(*) FROMpg_stat_activity; FROMpg_stat_activity - 1 regards, Marc

Re: [GENERAL] Prevent roles not having admin option from granting themselves to other roles

2015-06-11 Thread Adrian Klaver
On 06/11/2015 01:23 AM, Charles Clavadetscher wrote: Good morning I am investigating the authorization possiblities of PostgreSQL and I stumbled on a case, whose rationale I could not find in any resource online. For that reason I post my question here. First of all let me state that the softwa

Re: [GENERAL] Planner cost adjustments

2015-06-11 Thread Daniel Begin
Hi Bill, you are right about not changing two variables at the same time. I first increased the statistics target for problematic columns. It helps but did not provide significant improvement. I then changed the random_page_cost which really improved planner's choices about Seq/Index scan. Since

Re: [GENERAL] Planner cost adjustments

2015-06-11 Thread Bill Moran
On Wed, 10 Jun 2015 17:20:00 -0400 Daniel Begin wrote: > Here is a follow-up on adjusting the planner costs calculation > > -Statistics target of problematic columns were increased from 100 to 200. > -Analyse was ran on all concerned tables (actually ran on the whole DB) > -Random_page_cost was

[GENERAL] Prevent roles not having admin option from granting themselves to other roles

2015-06-11 Thread Charles Clavadetscher
Good morning I am investigating the authorization possiblities of PostgreSQL and I stumbled on a case, whose rationale I could not find in any resource online. For that reason I post my question here. First of all let me state that the software is acting accordingly to the documentation. The pass

Re: [GENERAL] Missing WALs when doing pg_basebackup from slave...

2015-06-11 Thread marin
On Thu, 11 Jun 2015 14:48:44 +1000, Venkata Balaji N wrote: > On Wed, Jun 10, 2015 at 6:47 PM, wrote: > Is it normal that pg_basebackup runs successfully (rc=0) and there is no > WAL files present? > > Yes, it is normal. "pg_basebackup" ensures that required WALs are backed > along with the da