Questions tagged [postgresql-9.1]

for PostgreSQL questions specific to version 9.1.

PostgreSQL 9.1 is the version of PostgreSQL released in September of 2011, with expected end-of-life in September of 2016.

While the generic tag should probably be used with all PostgreSQL-related questions, this tag should also be used if the question pertains to features added in version 9.1, or if the question is about a problem seen while running version 9.1.

1821 questions
0
votes
1 answer

Simply by the Query

Table name is group. Column name is groupno,name,grouprefno,detail,undergroupno Sample data of group groupno name grouprefno detail undergroupno 1 A 001 abc 0 2 B 002 cde 0 3 AA …
Sathish
  • 4,419
  • 4
  • 30
  • 59
0
votes
1 answer

Postgres failed to create database for rails-composer

I'm running the rails-composer script with rails new myproject -m https://raw.github.com/RailsApps/rails-composer/master/compser.rb And everything goes along smoothly until it asks me if I want to go ahead and drop the db in. I say yes. All drops…
6ft Dan
  • 2,365
  • 1
  • 33
  • 46
0
votes
1 answer

How to give super user privileges for the existing user in postgresql

How to create super user for the existing user in postgresql, i want to give the super user permission for the abc user, now this user has only create DB rights only, i want give as super user anybody help me.
0
votes
2 answers

select min and max values before a particular row per customerID SQL

I have a table which has info about visitors to our website. So it will look like VISITOR_ID EVENT Date Rank ( I already ranked them portioned by event) Visitor_id Event Date rank 1 visit 1/1/14 1 1 purchase …
0
votes
0 answers

How to change postgresql to store table names in uppercase without changing the way of accessing it

i am working on postgresql 9.2 and i am getting more difficulties with storing the table name in postgres in lower case. Is there any way so that we can store tables in upper case and retrieve using upper case or lower case instead of using double…
Krishna
  • 795
  • 2
  • 7
  • 24
0
votes
1 answer

create a postgresql dump file on ubuntu system

I am new to the ubuntu environment and I want to create the dump file of an database. Can any one help me to take the postgres dump file on ubuntu system
supraja
  • 85
  • 1
  • 7
0
votes
0 answers

Is it possible to create "Insensitive Table and Column name" in PostgreSQL

I am working on PostgreSQL 9.2 and i want to create a table with capital letter without using double quotes.Is it possible by any how? means CREATE TABLE STUDENT(NAME VARCHAR(50)); i want the table name must be look like "STUDENT" But postgresql…
Krishna
  • 795
  • 2
  • 7
  • 24
0
votes
1 answer

Postgresql stored function returning only values not with column names

I am new in Postgresql. I just created function with composite type. The following is my code: create type search_type as ( result_id bigint, result_name character varying, result_loc character varying, result_type character varying, result_pic…
Kichu
  • 3,284
  • 15
  • 69
  • 135
0
votes
1 answer

Setup ec2 to allow ssh connections only with the public key and database connections from custom ip

First of all, would the above be a good idea? Would this be overkill in which the security level will be same using another method? How would you do this? The alternative would be ssh tunneling from one machine to the database server but I'm not…
Daniel Chen
  • 163
  • 2
  • 11
0
votes
0 answers

Rails 4.0.4, ruby 2.1.0, Ubuntu 12.04 rake db:create fails, postgresql making me sad

Using Ubuntu 12.04 I know the problem isn't exactly new, but I googled extensively, check stackoverflow, followed solutions that were suggested to the letter - alas, to no avail. I have an app in Rails 4.0.4, Ruby 2.1.0, which I would like to…
0
votes
1 answer

Get count of Groupby (Sqlalchemy)

I am new to SQLAlchemy and need some help with a query. I have a usertraffic table with 200000 records, it has user_id and a date-time stamp with the time of their visit. I am using this query to group user by visit and show…
gogoku
  • 3
  • 1
0
votes
2 answers

Postgresql SQL query: getting a count of everyday within a period

Recently I wanna make a sql query on PostgreSQL that can do a counting of a table records that of everyday (or maybe every hour) of a certain period (a month or a day etc). A loop through every day of a period (month), in other words. How can I do…
Yunwei.W
  • 1,589
  • 1
  • 14
  • 31
0
votes
1 answer

unexplained error in sql execution

UPDATE amc_machine b SET with_parts = a.with_parts, amc_validity_upto = a.amc_validity_upto FROM (SELECT CASE WHEN count(*) > 0 THEN (SELECT DISTINCT ON (machine_id) with_parts, amc_validity_upto, machine_id …
Shh
  • 986
  • 9
  • 18
0
votes
1 answer

Running a complex loop query in PostgreSQL

I have one problem in PostgreSQL. This is my table (this table does not showing all data in image). What is my requirement is: Step 1 : find count of value (this is a column in table) Order by value for today date. So it will be like this and I did…
Nisarg
  • 3,024
  • 5
  • 32
  • 54
0
votes
1 answer

Use Escape Letter With Variable in Postgresql

I am update the record using trigger. Am tried CREATE OR REPLACE FUNCTION fn_trg_sales2() RETURNS trigger AS $BODY$ declare xNarr text=''; select name into xNarr from t1 where id =1; update t2 set narration =E narration || case when…
Sathish
  • 4,419
  • 4
  • 30
  • 59
1 2 3
99
100