Dan Joo wrote:
db=pg.connect('aqdev','localhost',5432,None,None,'postgres',None)
From the commandline the connection works great, but from a
cgi-script it barfs with the following message:
*InternalError*: could not create socket: Permission denied
My (obvious, granted) guess is that you're
Rhys Stewart wrote:
The example I provided earlier was a very simplified model of the table
I'm working with after a self join. The table in question contains
geographic data (linestrings)
PostGIS LINESTRINGs?
and I have written a function to return a
textual representation
Like
Roberts, Jon wrote:
On 23/04/2008 20:33, Roberts, Jon wrote:
create table ugly
[...snip...]
create or replace function fn_ugly() returns setof ugly as
[...snip...]
create temporary table temp_ugly
[...snip...]
select * from fn_ugly();
[...snip...]
Heh heh - I think we get the point!
Greetings.
I have a question regarding storing computed values. Essentially, it's
a question about caching, and I'm willing to implement a cache on the
client side or using pg_memcache, but I wonder if I can do this in a
PostgreSQL table, instead?
The background is that I'm using PostGIS
Richard Broersma wrote:
On Mon, Apr 21, 2008 at 10:34 AM, Colin Wetherbee [EMAIL PROTECTED] wrote:
I would like to have a table that contains a connection for each distinct
pair of points (point1 to point2 is the same as point2 to point1). This
table would then be automatically updated every
Colin Wetherbee wrote:
SELECT connect(p_start.location, p_end.location)
FROM foo
JOIN points AS p_start ON foo.point_id_start = points.point_id
JOIN points AS p_end ON foo.point_id_end = points.point_id
WHERE foo.id = 8192;
As I didn't test this code, my syntax was slightly incorrect
Richard Broersma wrote:
On Mon, Apr 21, 2008 at 11:02 AM, Colin Wetherbee [EMAIL PROTECTED] wrote:
Let's say my points table looks like this:
point_id | location
-+--
1 | 0101... -- some PostGIS geometry string
2 | 0101...
And, my foo table, which
Colin Wetherbee wrote:
Richard Broersma wrote:
On Mon, Apr 21, 2008 at 11:02 AM, Colin Wetherbee
[EMAIL PROTECTED] wrote:
Let's say my points table looks like this:
point_id | location
-+--
1 | 0101... -- some PostGIS geometry string
2 | 0101
Richard Broersma wrote:
On Mon, Apr 21, 2008 at 11:19 AM, Colin Wetherbee [EMAIL PROTECTED] wrote:
My impression of functional indexes is that they're useful mostly in WHERE
queries, like the following.
SELECT foo, bar, baz FROM some_table WHERE lower(foo) = 'qux';
In this case, the index
Richard Broersma wrote:
On Mon, Apr 21, 2008 at 12:24 PM, Colin Wetherbee
[EMAIL PROTECTED] wrote:
Right, but the problem I see is that my locations are not actually
stored in foo. Since many rows of foo can reference the same
location, the locations are stored in a separate table
I just made a typo in psql, and it resulted in something I wouldn't have
expected.
js=# \timimng
Showing only tuples.
js=# \t
Tuples only is off.
I also wouldn't have expected \timimng to have been interpreted as
\timing, which I tried to type in the first place, but perhaps a typo
like
Colin Wetherbee wrote:
I just made a typo in psql, and it resulted in something I wouldn't have
expected.
Oh, um, this was in the 8.3.1 psql.
Colin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
I just made a typo in psql, and it resulted in something I
wouldn't have expected.
js=# \timimng Showing only tuples.
This is related to the discussion about whether to require a space
between a backslash command name and its
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
I just thought I'd report it here in case it wasn't supposed to
happen, but from what you say, it seems like it's a feature.
Well, it's more of a historical hangover. Personally I'd not have
much problem with breaking backward
Mike Ginsburg wrote:
There is probably a really simple solution for this problem, but
for the life of me I can't see to think of it. I have three tables
--contains u/p for all users in the site TABLE users (user_id INT
primary key, username VARCHAR(50), password TEXT) --list of all
possible
Colin Fox wrote:
There were a number of people asking about ERD tools here a while ago,
so I decided to publish one that I've put together.
It's called Autograph, and you can find it on the pg foundry:
http://pgfoundry.org/projects/autograph/
Looks handy. I'd like to give it a try.
Colin Wetherbee wrote:
Colin Fox wrote:
Autograph is really just an XSL stylesheet, used in combination with
graphviz, xsltproc, convert and the downloadXml.py program from Scott
Kirkwood's xmltoddl package.
I'm familiar with graphviz and xsltproc, but what is convert? Is this
Imagemagick's
Colin Fox wrote:
Colin Wetherbee wrote:
Colin Wetherbee wrote:
Colin Fox wrote:
Autograph is really just an XSL stylesheet, used in combination with
graphviz, xsltproc, convert and the downloadXml.py program from Scott
Kirkwood's xmltoddl package.
I'm familiar with graphviz and xsltproc
Leif B. Kristensen wrote:
On Wednesday 2. April 2008, Tomasz Ostrowski wrote:
Go for it. Even 64 (I like round numbers) would not be too much.
Geek test: Do you find the above statement odd?
Yes: 0, No: +10.
(Sorry for being massively off-topic :-))
I had the same thought. ;)
Colin
--
Colin Wetherbee wrote:
Also, is there a way to forcibly remove tables and views from the
output? In all.xml, I only list the tables I want, but in addition to
those, I also get my PostGIS tables and all the views I've created
within the schema.
And...
If I set the tablemode to detailed
Chris Velevitch wrote:
I'm transferring a database from 7.4.7 to 7.4.13 using 8.1.11
utilities and pg_dump leaves out the without oids clause in the
create table commands. I've confirmed the original tables are created
without oids by using pgadmin3 v1.8.2.
How do I get the table created
Seb wrote:
--cut here---start-
SELECT table1.col1 - table2.col1 AS diff1,
table1.col2 + table2.col2 AS sum1,
sum1 - diff1
FROM table1 INNER JOIN table2 ON (table1.id = table2.id)
--cut here---end---
[EMAIL PROTECTED] wrote:
Message Digest
Volume 1 : Issue 8030 : index Format
Messages in this Issue:
200803/1324: Re: casting from integer to boolean
200803/1325: Re: casting from integer to boolean
200803/1326: Re: casting from integer to boolean
200803/1327: Re: Survey:
Tom Lane wrote:
Brett Hoerner [EMAIL PROTECTED] writes:
On Mon, Mar 31, 2008 at 10:54 AM, Colin Wetherbee
[EMAIL PROTECTED] wrote:
I received eight of these unwanted digests last night and early
this morning, after never seeing them before. Is this a new
configuration change that I need to go
Richard Broersma wrote:
On Thu, Mar 27, 2008 at 11:33 PM, Michael Fuhr [EMAIL PROTECTED] wrote:
Or a few minutes with shapefiles and PostGIS, using the latter's
spatial functions to identify geometries that touch. Below are the
results of such an operation; I haven't verified the entire
brian wrote:
I'd like to add a table, state_neighbours, which joins each state with
all of its neighbour states. Does anyone know where I can find such a list?
I'm not interested in nearest neighbour, just any connected state.
That sounds like something you could create in 20 minutes with a
Gregory Williamson wrote:
No can do, already taken:
man pg
Reformatting pg(1), please wait...
PG(1) User
Commands PG(1)
NAME
pg - browse pagewise through text files
Good catch. Haven't used
Zdeněk Kotala wrote:
1) What type of names do you prefer?
---
a) old notation - createdb, createuser ...
b) new one with pg_ prefix - pg_createdb, pg_creteuser ...
c) new one with pg prefix - pgcreatedb, pgcreateuser ...
d) remove them - psql is the solution
e)
John Smith wrote:
On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee
[EMAIL PROTECTED] wrote:
Please don't cross-post, especially since nobody on the PostGIS
mailing list answered your previous question.
please don't cross-post my cross-post. if i wanted to post it to the
postgresql list, i
John Smith wrote:
guys,
Please don't cross-post, especially since nobody on the PostGIS mailing
list answered your previous question.
how many min. floating-points must a server hardware support for
postgresql+postgis? does postgresql+postgis do much floating-point
math to make a
Sam Mason wrote:
On Thu, Mar 20, 2008 at 02:02:12PM -0400, John Smith wrote:
how many min. floating-points must a server hardware support for
postgresql+postgis? does postgresql+postgis do much floating-point
math to make a difference? can someone give postgresql+postgis
application examples
Adrian Klaver wrote:
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to create the TEMP table first, specify all
column types, etc.
CREATE
Adrian Klaver wrote:
On Thursday 13 March 2008 2:46 pm, Colin Wetherbee wrote:
Adrian Klaver wrote:
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Adrian Klaver wrote:
Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ;
I don't know what version the OP is using, but that doesn't work on 8.1:
Seems to be there in 8.2 and up.
In 8.2:
cww=# BEGIN;
BEGIN
cww
Colin Wetherbee wrote:
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Adrian Klaver wrote:
Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ;
I don't know what version the OP is using, but that doesn't work on 8.1:
Seems to be there in 8.2 and up.
In 8.2
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Colin Wetherbee wrote:
cww=# CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b);
FWIW, the output of \h CREATE TABLE in both 8.1 and 8.2 suggest that
this should be possible.
\h CREATE TABLE AS is what describes
Gauthier, Dave wrote:
I have a perl/dbi app that loads my DB with sequential and discrete
insert statements. Runs very fast and I’m satisfied with it. Now I
have to run the same app from a different site, but loading my local
DB. The “one at a time” inserts take too long, probably because
akshay bhat wrote:
The ConceptNet 3 database, as a PostgreSQL input file. You will need to
be running a PostgreSQL server to install ConceptNet 3.
i was earlier
suggested to use following command
to add it to database
psql -d your_database_name -f conceptnet-2007-09-25.psql
however i do not
Justin wrote:
The help is not real clear nor can i find examples how to write an
aggregate function.
Examples:
http://www.postgresql.org/docs/8.2/static/xaggr.html
I searched the archive of the mail list and did not find anything
The online documentation is excellent for these sorts of
Shahaf Abileah wrote:
It would be great if the documentation could be kept as close to the
code as possible – that way we stand a chance of keeping it up to date.
So, in the same way that Java docs go right there on top of the class or
method definitions, it would be great if I could attach
[EMAIL PROTECTED] wrote:
I need to connect a windows client running activestate perl 5.8.8 to
a postgres database running on windows 2003 server. I have loaded
DBI:pg module and DBD with various degrees of success. When I run a
simple test script to make a connection to the postgres database I
Chris Bowlby wrote:
test=# select tab.dr_prod_date FROM
test-# (SELECT ('01/01/0'::text || substring(ilch.lot_id::text, 5,
1))::date AS dr_prod_date FROM my_lot_test ilch) AS tab
test-# where tab.dr_prod_date = '2/5/08' limit 1;
ERROR: invalid input syntax for type date: 01/01/0W
Using
akshay bhat wrote:
hello i am new to psql or any database stuff.
i have downloaded an .psql file from internet and wish to open it and
see the data inside.
i am working on windows xp and have installed the software successfully.
please help i am my wits end.
it is huge file 800mb
and is
Steven De Vriendt wrote:
I'm using the latest postgreSQL with the lastest postgis.
When executing every command I want to use, I get the following error
message:
postgis=# createdb;
ERROR: syntax error at or near createdb
LINE 1: createdb;
What other commands are you trying?
createdb is
Decibel! wrote:
I wrote this query to identify how much space is being wasted in a
database by denormalized data. For each field in each table, it
calculates how much space the field is taking in it's table as well
as indexes, then it calculates how much space would be needed if that
field was
Kynn Jones wrote:
I have a stored procedure that has been running for a very long time.
Before doing the current real run, I tested the procedure on a toy
case and confirmed that it produced the right result. So I know that
when it finishes it will be OK, but I can't tell whether it will
TJ O'Donnell wrote:
I've been running PostgreSQL on a virtual server for several years
now. I'm using VMWare with a Windows host and Linux guest. I've
configured it to let Linux use a raw partition as a disk. Before I
used a separate partition, the virtual disk had been a Windows
file. Using
In a couple months, I'm going to be considering how best to deploy an
application I have that uses PostgreSQL as its back-end. It also makes
heavy use of Perl under mod_perl and UMN MapServer with a sprinkling of
PostGIS.
I've recently become intrigued by the idea of virtualized servers [0],
Tom Lane wrote:
Stefan Niantschur [EMAIL PROTECTED] writes:
So far I have been successfully doing calls to SPI, select the data from the
table and return it. However, this works only with string not larger than
page size of char[8192].
The strings I expect are much longer and this causes the
Greg Smith wrote:
I recall a couple of people asking about when 8.3 would be available for
Debian and Ubuntu. Here's an update now that some useful packages have
come out this week.
Thanks for the summary, Greg.
Colin
---(end of broadcast)---
Andrej Kastrin wrote:
||5354235||,||some text...|| ||1234567||,||some text...||
||1234568||,||some text...||
The sql statement I defined was:
COPY testtable FROM 'test.txt' WITH DELIMITER AS ',' CSV QUOTE AS
'||';
but the error:
ERROR: COPY quote must be a single ASCII character
I guess
Enrico Sirola wrote:
Hello,
I'd like to perform linear algebra operations on float4/8 arrays. These
tasks are tipically carried on using ad hoc optimized libraries (e.g.
BLAS). In order to do this, I studied a bit how arrays are stored
internally by the DB: from what I understood, arrays are
Colin Wetherbee wrote:
CaT wrote:
On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote:
well its using the pgsql_replication_check.pl, which does:
--
use Pg;
...
So I assume it's not getting past the use Pg line as although it's
looking in /usr/lib/perl5 it's
CaT wrote:
On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote:
well its using the pgsql_replication_check.pl, which does:
--
use Pg;
...
So I assume it's not getting past the use Pg line as although it's
looking in /usr/lib/perl5 it's not going to look in
adam_pgsql wrote:
this looks to be using the Pg module rather than DBI + DBD::Pg. This one
i think:
http://www.cpan.org/authors/id/M/ME/MERGL/pgsql_perl5-1.9.0.tar.gz
i think thats quite old now though
Indeed, that's how it looks. That would be in the libpg-perl package on
Debian. In
lan ping wrote:
Hi, there
In our database, some customers' names contain French accent like
É,é,È,è. In one server, case-insensitive search works for capital
letters. For example,
SELECT lower('ÉÈ') could return éè . But the other server cannot.
It is very strange, as the two server use
Pavel Stehule wrote:
when database uses different encoding, than is specified in cluster's
initialization, then lower, upper doesn't work.
Oooh. That's... confusing.
Colin
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner
Rajarshi Guha wrote:
Hi, I am trying to write a PL/pgsql function that will take a CUBE
variable (which will be a 1D point) and a double precision variable.
If the input CUBE is defined as
'(x,y,z)'::cube
the function would then return a CUBE value of the form
Joshua D. Drake wrote:
On Fri, 4 Jan 2008 14:59:47 -0800
Webb Sprague [EMAIL PROTECTED] wrote:
Hi all,
Is there a way to determine the pid of a database connection from
within that connection?
As a hypothetical example, I would like to be able to do the
following:
$ps x
PID TTY STAT
Marcin wrote:
Did anybody face the same problem during the compilation of
postgresql 8.2.5 on suse 10.2? I'm using gmake 3.81
In the future, please include subjects in your posts.
gcc -I../../include -I../../../../../src/interfaces/ecpg/include
-I../../../../../src/interfaces/libpq
Albe Laurenz wrote:
Marcin wrote:
Did anybody face the same problem during the compilation of
postgresql 8.2.5 on suse 10.2? I'm using gmake 3.81
[...]
dynalloc2.pgc:55: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
GMail wrote:
When trying to create an index on a composite type, I need to enclose
the columns in paranthesis. Is this normal?
I don't think so as there's no mention in the friendly manual.
I think your problem is similar to one that has been discussed here
previously.
Colin Wetherbee wrote:
My guess, having written this, is that your approach might be more
useful for applications that rely heavily on interaction with a
database. I'd appreciate any more comments you have on this, though.
Tom, Sam, and Ted (a lovely assortment of three-letter names), thank
Gregory Williamson wrote:
Kevin H. wrote on Tue 12/18/2007 7:26 PM
Hullo List,
This is aimed at everyone in this community who contributes to the
Postgres project, but especially at the core folks who continually make
this community great through energy, time, money, responses, and
Sam Mason wrote:
On Sun, Dec 16, 2007 at 06:31:56PM -0500, Colin Wetherbee wrote:
If I write one Perl sub for each operation on the table (e.g. one that
gets the username and password hash, another that gets the last name and
first name, etc.), there will be a whole lot of subs, each of which
Sam Mason wrote:
Luckily I've been able to design most of the programs I work on as
relatively simple layers over a database, I'm not sure if you're able to
work like this.
I'm not at liberty to divulge much of the application concept, but
consider, if you will, an application like Gmail or
Ted Byers wrote:
--- Colin Wetherbee [EMAIL PROTECTED] wrote:
Sam Mason wrote:
On Sun, Dec 16, 2007 at 06:31:56PM -0500, Colin
Wetherbee wrote:
If I write one Perl sub for each operation on the
table (e.g. one that
gets the username and password hash, another that
gets the last name
Greetings.
I am working on a PostgreSQL-backed mod_perl web application that's just
in its infancy.
Let's say I have a users table that holds about 15 columns of data about
each user.
If I write one Perl sub for each operation on the table (e.g. one that
gets the username and password
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Let's say I have a users table that holds about 15 columns of data about
each user.
If I write one Perl sub for each operation on the table (e.g. one that
gets the username and password hash, another that gets the last name and
first
marco santillan wrote:
I need to be able distribute like my application with postgresql to the
final client and since as I can assure or encryptar the database to
avoid the command trust.
Tu pregunta fue traducida mal. Visita por favor el URL siguiente para la
información sobre la comunidad
Vivek Khera wrote:
On Dec 7, 2007, at 11:42 AM, Colin Wetherbee wrote:
You can do this with a conditional. Something like the following
should work.
IF
NOT (a query matching your data returns rows)
THEN
INSERT (your new data)
There exists a race condition here unless you've locked your
Vivek Khera wrote:
On Dec 10, 2007, at 5:04 PM, Colin Wetherbee wrote:
For what it's worth, the real algorithm would be as follows. I
hadn't had enough coffee yet, and I forgot the UPDATE bit.
IF (a query matching your old data returns rows) THEN UPDATE with
your new data ELSE INSERT your
Ted Byers wrote:
--- Erik Jones [EMAIL PROTECTED] wrote:
On Dec 6, 2007, at 2:36 PM, Ted Byers wrote:
[snip]
What you want to do here for handling the update v.
insert is called
an UPSERT. Basically, what you do is run the
update as if the row
exists and catch the exception that is
73 matches
Mail list logo