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.
0
votes
0answers
3 views
Selecting adjancent polygons with constraints in POSTGIS
I want to know how can i peform this taks.
selecting adjacent polygons such that each group of adjacent polygons satisfies the constraints
0
votes
0answers
12 views
update ..set..select: how to apply it on the entire column
How can I obtain the result expected from the following query, currently not supported in postgres enter link description here, (see last section on compatibility)
UPDATE accounts SET ...
-1
votes
3answers
43 views
Error when I passed on values on function
Sorry about the last post I had. Here's my revision, please help me.
<?php
//connect database
$sql = "SELECT * FROM user where user_id = 8320 AND password = 'admin' ";
$query = pg_query($sql);
...
-1
votes
4answers
58 views
cannot return the exact values in php
I'm sorry.. I just want to clarify my post earlier.
<?php
$db = pg_connect("host=localhost dbname=dbname user=user password=password");
$sql = "SELECT * FROM users WHERE user_id ...
-5
votes
0answers
30 views
How does MySQL, PostgreSQL, and SQLite represent databases in C? [closed]
I have been attempting to look through the source of all three packages, and I have been having a difficult time determining how these databases represent a table, collection of columns, and a row in ...
0
votes
1answer
31 views
Passing in literal array to PostgreSQL function
I have a Postgres function which contains a select statement. I need to add a condition using a passed in variable containing an array of string values.
CREATE OR REPLACE FUNCTION get_questions(
...
0
votes
1answer
17 views
Can you use pg_connect in PHP to use ONLY local unix-domain sockets?
Okay, this is something I've been banging my head on for a few weeks now, so just bear with me. When I set up my postgres database, I wanted to connect to it only through the local Unix socket. Just ...
1
vote
0answers
12 views
Sql query not working in Visual Studio 2010 report
I have some problems with a report in Visual Studio 2010.
I made a query in PostgreSQL that works fine when I run it in pgAdmin Sql Editor, however after I make a new Dataset and TableAdapter in ...
0
votes
0answers
14 views
Cloudbees dev cloud + Postgresql + rubygems pg (native extension) how to use?
I want to use postgres in cloudbees dev cloud, I read this article:
http://wiki.cloudbees.com/bin/view/DEV/PostgreSQL
But, I run bundle, I got error:
Installing pg (0.15.1) .......
...
-1
votes
0answers
22 views
Rails Movies Database API
I am currently creating a Rails Movie app, there is a Movies controller with obviously models and views etc..
So that my app can be the app i need it to be, I will need my database to have a ...
1
vote
1answer
35 views
Count result of many joins in postgresql
I have this query:
select count(*)
from seller s
left join product pr on s.id = pr.seller_id
left join special_price_discount spd on pr.id = spd.product_id ...
2
votes
1answer
34 views
Postgres query to find all dependent tables
I want to find all objects (tables, views, ... etc) that have a dependency on a specific table.
What is a query I could write in postgres to accomplish this.
1
vote
2answers
21 views
Postgres and partial dates
So I have a table. Every entry in that table has a date associated with it, which has to:
support partial dates: 2nd may 1994, 16:45 GMT+4 and april 2003 are both valid
be comparable: I want to ...
-1
votes
1answer
17 views
postgresql update table but keep primary key
I would like to update my table but kepp the primary number. The following code works in terms of changing the data but it keeps updating the primary key which means I get a new row inside the table. ...
1
vote
2answers
39 views
How to add column with auto incremented value for added rows in SQL?
I have a main table X with columns a,b which I wish to copy to other table Y.
Y has 3 columns: a,b,z where z should be auto incremented - 0,1,2...
I want to be able to do
INSERT INTO Y(a,b,z) select ...