Tagged Questions
0
votes
1answer
16 views
pg_relation_size command is not providing size
I need to find size of a table in posgreSQL. I am using following command but it is giving me 0 as an output. Could you please inform me how can I get the size of a table?
INPUT:
select ...
0
votes
1answer
14 views
Postgresql Log Connection
Is it normal if I have this :
2013-09-24 12:08:24 WIT LOG: connection authorized: user=xxxxxx database=xxxx
2013-09-24 12:08:24 WIT LOG: connection received: host=xx.x.xx.91 port=59878
2013-09-24 ...
1
vote
1answer
351 views
cannot create extension without superuser role
I'm trying to run unit tests in Django, and it creates a new database. The database has postgis extensions and when I regularly create the database, I use "CREATE ExTENSION postgis".
However, when I ...
0
votes
0answers
38 views
SQL database query display extra dates
I am making a database with postgresql 9.1
Given tables:
CREATE TABLE rooms(
room_number int,
property_id int,
type character varying,
PRIMARY KEY (room_number, property_id)
);
Insert ...
1
vote
2answers
31 views
Updating multiple rows with different primary key in one query in PostgreSQL?
I have to update many columns in many rows in PostgreSQL 9.1. I'm currently doing it with many different UPDATE queries, each one that works on a different row (based on the primary key):
UPDATE ...
-2
votes
0answers
25 views
recovering postgresql database with pg_xlog without a base back-up file
I accidentally removed the all rows of a postgresql database.
The problem is that there is no back-up file except the data saved in data/pg_xlog/* in forms of binary.
Here, the structure and the ...
2
votes
1answer
48 views
How to split a list of values into a variable and how to make a insert function work under a for each loop in postgreSQL
I am Having two Tables.
partyList
create table partyList
(
sno serial NOT NULL,
Party_title text,
Party_venue text,
Party_date date,
Party_list character varying,
Amount_list text
);
list
...
2
votes
1answer
2k views
How do I convert an integer to string as part of a PostgreSQL query?
How do I convert an integer to string as part of a PostgreSQL query?
So, for example, I need:
SELECT * FROM table WHERE <some integer> = 'string of numbers'
where <some integer> can be ...
0
votes
1answer
39 views
PostgreSQL, How to re-cast a table column from Integer to Decimal?
I'd like to alter a PostgreSQL column to convert from integer to decimal, setting all integer values to <value>.0. How do I do this?
0
votes
1answer
24 views
How to use LO datatype with postgresql?
What I'm currently trying to do:
I am using a software with Postgresql as the backend DB. The software supplies an API that uses a web service to communicate with the software/DB. I am trying to ...
1
vote
2answers
167 views
CakePHP use wrong sequence name (PostgreSQL)
When I try save some information in Postgres table, CakePHP return this error for me:
array(
(int) 0 => '[PDOException] SQLSTATE[42P01]: Undefined table: 7 ERRO: relação ...
0
votes
1answer
35 views
Postgres SELECT … FOR UPDATE in functions
I have two questions about using SELECT … FOR UPDATE row-level locking in a Postgres function:
Does it matter which columns I select? Do they have any relation to what data I need to lock and then ...
0
votes
3answers
716 views
Hibernate startup very slow
For some reason, the startup of my hibernate application is unbarrably slow. (up to 2 min)
I have been thinking that the c3p0 configuration is plain wrong (related question) but studying the logs ...
0
votes
1answer
11 views
Parsing the value and copying it to another column in postgresql
Column_1(varchar) has values with the format like 1024 MB , 2048 MB etc. There also exits Column_2(int). Now i would like to parse the value in column_1 and update the column_2 with values like 1024, ...
0
votes
1answer
25 views
SQL to change values (var char(20)) of a column [closed]
Table_neme:employee details
--------------------------------------------
c_bp_id | value | name |address
--------------------------------------------
10001 |001 |john |
10002 |mathew ...