[SQL] Bizarreness at A2 Hosting

2011-03-17 Thread Good, Thomas
I realize this is not the right list for this question but I am just 
flabbergasted, am only on one list, and, know Tom Lane is here so, please 
excuse...

Here is the deal:

On a2 hosting I do the following:

1) create a new database in cpanel
2) login via psql
3) run \d 

AND - there is ALREADY a table belonging to another user (not a privileged 
user, another account owner)
I can see this guy's schema but can't access the data. (I guess that's a 
positive)

I have repeated this three times so far...after I created a db, populated it 
and found a table that wasn't mine I created a test db that should have been 
empty.

4) try to run pg_dump - it fails as it is unable to lock this other guy's table

tech suppt argues with me that their template is not hosed, "that is the nature 
of postgre," he said (not a typo, he omitted the trailing s)

These guys are recommended by postgresql.org so I figured I'd try em...
I have another account (for a client whom I support pro bono) and they do not 
have this problem. New databases are empty as one would expect.

Can someone tell me what exactly the problem is - I am waiting for a supervisor 
to call me back and I'd like to lead him to the answer so he can fix the 
problem.

thanks much
--
Thomas A. Good, Senior Database Administrator
Saint Vincent's Hospital Westchester
A Division of Saint Joseph's Medical Center
Residential Services
75 Vanderbilt Avenue, Room 5-47
Staten Island, NY 10304
718.818.5528
-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] Bizarreness at A2 Hosting

2011-03-17 Thread John DeSoi

On Mar 17, 2011, at 12:26 PM, Good, Thomas wrote:

> 4) try to run pg_dump - it fails as it is unable to lock this other guy's 
> table
> 
> tech suppt argues with me that their template is not hosed, "that is the 
> nature of postgre," he said (not a typo, he omitted the trailing s)
> 
> These guys are recommended by postgresql.org so I figured I'd try em...
> I have another account (for a client whom I support pro bono) and they do not 
> have this problem. New databases are empty as one would expect.
> 
> Can someone tell me what exactly the problem is - I am waiting for a 
> supervisor to call me back and I'd like to lead him to the answer so he can 
> fix the problem.


I think you are right -- they likely have some one's stuff in the template 
database. On your account that does not have the problem -- is it on the same 
host?



John DeSoi, Ph.D.





-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL]How to transform table rows into Colum?

2011-03-17 Thread Richard Albright

you can also generate a crosstab table using the sign function

you can check out the link below ( its a sqlite tutorial, but the same 
idea will work for pg too )


http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html


On 03/09/2011 12:16 PM, Eric Ndengang wrote:

Hi Guys,
I have the following table:

Name   Value   rang  salary

name1   value1  12500
name2   value2  22600
name3   value 3 3300

and want to obtain the following result:

name1  name2  name3

value1  value2   value3
1 23
2500  2600300

what should i do ? I read about the crosstab function  in postgresql 
but still have no idea on how to use it to solve this problem.

Any help would be appreciated
Regards




--
*Rick Albright*
Senior Quantitative Analyst
Web: www.insiderscore.com 
Email: [email protected] 


Re: [SQL] Bizarreness at A2 Hosting

2011-03-17 Thread Good, Thomas
Hi John,

No the two hosts are separate and so it's two separate pg templates.
The techie told me, "well, it's ok, because you can see his table but you can't 
access his data..."

egads


From: John DeSoi [[email protected]]
Sent: Thursday, March 17, 2011 1:05 PM
To: Good, Thomas
Cc: [email protected]
Subject: Re: [SQL] Bizarreness at A2 Hosting

On Mar 17, 2011, at 12:26 PM, Good, Thomas wrote:

> 4) try to run pg_dump - it fails as it is unable to lock this other guy's 
> table
>
> tech suppt argues with me that their template is not hosed, "that is the 
> nature of postgre," he said (not a typo, he omitted the trailing s)
>
> These guys are recommended by postgresql.org so I figured I'd try em...
> I have another account (for a client whom I support pro bono) and they do not 
> have this problem. New databases are empty as one would expect.
>
> Can someone tell me what exactly the problem is - I am waiting for a 
> supervisor to call me back and I'd like to lead him to the answer so he can 
> fix the problem.


I think you are right -- they likely have some one's stuff in the template 
database. On your account that does not have the problem -- is it on the same 
host?



John DeSoi, Ph.D.





-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql