PostgreSQL is an open-source, object-relational database management system (ORDBMS) available for many platforms including Linux, UNIX, MS Windows and Mac OS X. Please mention your PostgreSQL version when asking questions.

learn more… | top users | synonyms (3)

-3
votes
0answers
10 views

How to remove space while inserting and fetching data in and from postgres table?

I written this query,for fetching data from PostgreSQL to show in my HTML Page without space in text box , SELECT * from table name where column name='"+variable name.trim()+"'; but trim() function ...
0
votes
1answer
6 views

How do I get an ngram from HiveQL into PostgreSQL?

I'm running this query on treasure-data.com (HiveQL): SELECT ngrams ( sentences ( LOWER( v[ 'text' ] ) ) ,1 ,100 ) FROM item WHERE TD_TIME_RANGE ...
1
vote
0answers
19 views

How to get database size accurately in postgresql?

We are running on PostgreSQL version 9.1, previously we had over 1Billion rows in one table and has been deleted. However, it looks like the \l+ command still reports inaccurately about the actual ...
0
votes
0answers
12 views

Extracting multiple levels of xml data using xpath in postgres.

I need to extract three columns of data from an xml column in postgres, such that the xml is expanded into it's appropriate columns. One of these columns needs to be an attribute of one nesting level ...
0
votes
1answer
28 views

Count all records from midnight until now()

I'm trying to grab all records created from midnight of the current day until the time a button is pressed. I've tried something like this meanwhile but it doesn't really solve the issue. SELECT ...
0
votes
0answers
20 views

postgres - What could be the dependent objects for a trigger

Could anyone explain what objects could possibly depend on a trigger in postgres. Below is the syntax for drop trigger: DROP TRIGGER [ IF EXISTS ] name ON table [ CASCADE | RESTRICT ] ...
0
votes
1answer
13 views

Rails migrate a column to an association

I have a rails application with a postgres db. I started with a rails model Ticket that kept track of the Event the ticket has access to, but multiple tickets can be purchased at one time. So now I ...
1
vote
1answer
39 views

Using postgres rank function to limit to n top results

I am querying an account payables table that has list of ap documents of which each has ( among other fields) the ones I am interested in to run aggregate queries over: vendor_id, amount and a ...
1
vote
1answer
14 views

return last inserted row in postgres with RETURNING statement

I've got a pretty simple function defined like so. Where I'm struggling is how to actually RETURN the ident sent back via the returning statement. I've tried setting it to a variable but that either ...
0
votes
0answers
23 views

Advantages of using ElasticSearch versus Texticle [on hold]

What's the advantage of using ElasticSearch versus using Texticle in a Rails/Postgres @ heroku app ?
0
votes
0answers
10 views

Truncating table before dynamic SQL with looping variables inside of one function

I have a function that loops through specific schema names and inserts data into a table. I would like to be able to truncate said table before the insert loop occurs. I've tried putting the truncate ...
0
votes
1answer
17 views

Need better summation select statement in postgres function

I've got two tables in my database. One of them, 'orders', contains a set of columns with an integer which represents what the order should contain (like 5 of A and 15 of B). The second table, ...
0
votes
0answers
11 views

Web.py insert not returning the row id for certain tables

The web.py database insert function is supposed to return the row id, but it's not doing so. It's just not returning anything. However, when I check the database, the record is there; the function is ...
0
votes
0answers
15 views

postGIS's nearest neighbor with node.js

I,m using postgreSQL 9.1 , postGIS 2.0, nodejs 0.10.12 and the latest version of node's pg module. I use websockets on the server side. I have two functions. Depending on the data came from the user ...
0
votes
1answer
30 views

TRIM not works with lines and tabs of a xpath in PostgreSQL?

With this query SELECT trim(title) FROM ( SELECT unnest( xpath('//p[@class="secTitle1"]', xmlText )::varchar[] ) AS title FROM t1 ) as t2 and XML input text with lines and spaces, ...

1 2 3 4 5 1251
15 30 50 per page