tring(attribute from '^http://[^/]*/') from pg_atpwhere attribute like 'http://%';w/o DISTINCT there should be duplicates (if any)don't use "DISTINCT ON" at all, it's evil :-) (why?http://chernowiki.ru/index.php?node=38#A13)On 8/8/06, Christoph Pingel web.de&
Am 08.08.2006 um 19:49 schrieb Nikolay Samokhvalov:
SELECT DISTINCT substring(attribute from '^http://[^/]*/') from pg_atp
where attribute like 'http://%';
w/o DISTINCT there should be duplicates (if any)
don't use "DISTINCT ON" at all, it's evil :-) (why?
http://chernowiki.ru/index.php?node=
Hello to the list,here's an SQL question, I hope it's not off topic. From a list of URLs I want to get only the distinct values of the *web sites* these URLs belong to, that is everything before and including the 3rd slash, and I think this should be possible within the DB. I would like to say some
Trying to connect with a pgsql 8 server (locally), psycopg return this error:
Traceback (most recent call last):
File "", line 1, in ?
psycopg.OperationalError: could not connect to server: ?R@
Is the server running locally and accepting
connections on Unix domain socket "/var/run
Please ignore my previous post, if you still can... :-) I simply and
embarassingly forgot to commit the view to the db ooops.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
I'm still quite new to postgres, struggeling with 'views'... I'm on
OS X, using aquadatastudio to interface the db.
Now, after issuing a 'CREATE VIEW' command, I get back a '1 record
affected' message, and I can use the view. However, the view doesn't
appear in the tree view of aquadatastudio (
You've got two columns that the system wants to call "obj_id" here.
Try something like
SELECT s.obj_id AS s_obj_id, ...
That would have been elegant, but returns a 'syntax error at or near
"s_obj_id"'. Hm...
Was just some minor syntax error. Works now - this is exactly what I wanted.
Thanks!
re
You've got two columns that the system wants to call "obj_id" here.
Try something like
SELECT s.obj_id AS s_obj_id, ...
That would have been elegant, but returns a 'syntax error at or near
"s_obj_id"'. Hm...
Thanks,
Christoph
---(end of broadcast)---
BTW: that's not a postgres problem, ANY relational database will
give the same error here.
I didn't suspect it to be a postgres problem. I only didn't have the
opportunity to make this mistake working with MySQL. :-)
best,
Christoph
---(end of broadcast)---
Could you give an actual example?
Sure. The idea is that 'objects' (persons, books, places) from a
table obj are linked with each other in a link table ool where
objects from obj can appear in an 'subject' or a 'object' column.
Since the relation can be any, this is a very flexible and lean
des
Hello,
is there any restriction re the use of self joins in views? I have a
moderately complicated query where I scan the same table twice using
aliases, and I would like to put that into a view to keep my python
code clean. However, I get an error 'column xy duplicated'. Is this
so by design?
Please tell me if Postgresql runns in an iMac.
If you're on OS X, sure. I'd recommend installing darwinports
(http://darwinports.opendarwin.org), which makes downloading and
compiling as easy as that:
sudo port install postgresql8
darwinports also features several modules for accessing postgr
ll index of 99.9 % of my entries. I
did this in MySQL, but I didn't find it in the pg manual.
How do I proceed?
best regards, and TIA
Christoph Pingel
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
13 matches
Mail list logo