Re: [SQL] SOLVED: update column based on postgis query on anther table

2013-07-16 Thread Stefan Sylla
Hi Igor, thank you so much, the trigger function that you provided is exactly what I was looking for. I already read/heard about the SELECT INTO statement but I never actually understood what it is needed for. Here I go ;-) Stefan -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org

[SQL] update column based on postgis query on anther table

2013-07-15 Thread Stefan Sylla
ems to return a null value: /**/ INSERT INTO test1_point (id,the_geom) values ( 2,GeomFromText('POINT(91759.2587143761 2296245.93565599)',32648)); select * from test1_point where id=2 --(returns: 2;;"010120887F86AFB123F466F6405393C3F7DA844141") An

Re: [SQL] Column "..." does not exist (view + union)

2011-12-17 Thread Stefan Weiss
SELECT relname FROM pg_class WHERE relhasoids ORDER BY relpages; (ERROR: column "relpages" does not exist) I understand the error now (I think), and I know how to avoid it. thanks, stefan -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Column "..." does not exist (view + union)

2011-12-17 Thread Stefan Weiss
On 2011-12-17 10:02, Andreas Kretschmer wrote: > Stefan Weiss wrote: >> >> SELECT name >> FROM dossier_contact_v >> WHERE dossier_id = 56993 >>AND ctype = 234 >> UNION >> SELECT name >> FROM dossier_con

[SQL] Column "..." does not exist (view + union)

2011-12-16 Thread Stefan Weiss
E x.dossier_id = -1 AND x.ctype = -1 ORDER BY x.ctype; ERROR: missing FROM-clause entry for table "x" LINE 10: ORDER BY x.ctype ^ I am using "PostgreSQL 8.4.10 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-

[SQL] Is there a solution for "SELECT OR INSERT"

2010-11-28 Thread Stefan Becker
egards and thank-you for your time Stefan -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] REFERENCES and INHERITS restrictions?

2008-02-27 Thread Stefan Scheidegger
this is about inheritance. When I reference directly to tbl_child1, everything works just fine. Any idea? Greets Stefan -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] INSERT INTO relational tables

2007-12-10 Thread Stefan Scheidegger
mer folgendes: > > am Mon, dem 10.12.2007, um 11:42:04 +0100 mailte Stefan Scheidegger > folgendes: > > > Thanks for your hints so far. > > > > > > I'm looking for both syntax simplicity and referential integrity. I'm > > > using c++ with

Re: [SQL] INSERT INTO relational tables

2007-12-10 Thread Stefan Scheidegger
of this would be better than INSERTing to tbl_customer, fetching the ID and then do several INSERTS to tbl_order in c++. But actually I tend to do it with several INSERT statements in one transaction, as Steve proposed. Cheers Stefan -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der ka

[SQL] INSERT INTO relational tables

2007-12-07 Thread Stefan Scheidegger
re in posgres/sql an abstraction-layer that allows me to insert as if the information was stored in one table? (Something like a VIEW that provides INSERT, UPDATE, … and automatically inserts the referenced ID.) Thanks for any help! Stefan -- Pt! Schon vom neuen GMX MultiMessenger gehört? De

Re: [SQL] pg_clog (?) problem with VACUMM

2007-11-27 Thread Stefan Becker
I found out MUCH later found out - I could no longer vacuum the Database. I restored the missing files from a backup and everything was okay again, after a vacuum of the database the system cleaned out the older pg_log/ files on its own. I hope you get things fixed! My

Re: [SQL] Many databases

2007-09-21 Thread Stefan Arentz
things :-) S. On 9/22/07, Hiltibidal, Robert <[EMAIL PROTECTED]> wrote: > How is this possible? > > It smacks of a security issue which there are many proven solutions to > that. > > Would you elaborate? > > -Original Message- > From: [EMAIL PROTECTED]

[SQL] Many databases

2007-09-21 Thread Stefan Arentz
I'm in a strange situation where it makes more sense to give each user it's own database instead of having a single database with users and permissions. How does PG deal with that? Is it a problem to have have say a thousand small databases? S. ---(end of broadcast)--

[SQL] Speeding up schema changes

2007-09-03 Thread Stefan Arentz
Is there a way to speed up simple schema changes like ... ALTER TABLE foo ADD COLUMN bar CHAR(64); ... where foo already contains millions of records? On a live database changes like this can take hours. Even when the database is idle. Is there a better way to do this? S. --

[SQL] strange result for select * from table where id=random()*900

2007-07-27 Thread Stefan Zweig
three results back from the above query although i thought it should give only one random dataset from the table. what is wrong? i appreciate any help. thanks in advance, stefan _ In 5 Schritten zur eigenen Homepage. Jetzt

Re: [SQL] Counting all rows

2007-06-23 Thread Stefan Arentz
On 6/23/07, Andreas Kretschmer <[EMAIL PROTECTED]> wrote: Stefan Arentz <[EMAIL PROTECTED]> schrieb: > I need to get statistics from a bunch of tables. Simply the number of > records in them. > > The query plan looks like this: > > => ex

[SQL] Counting all rows

2007-06-23 Thread Stefan Arentz
I need to get statistics from a bunch of tables. Simply the number of records in them. The query plan looks like this: => explain select count(id) from stuff; QUERY PLAN --- Aggregate (cost=1629.69..1629.

[SQL] show index from [table]

2007-06-08 Thread Stefan Zweig
L) in postgresql. thanks in advance, stefan ___ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 ---(end of broadcast)--

Re: [SQL] ROW_NUMBER alias

2007-05-06 Thread Stefan Becker
ecord for the current sequence order in your table? I believe: SELECT a, b, c FROM table offset 973 limit 1 will accomplish the same result. Stefan -- email: [EMAIL PROTECTED] tel : +49 (0)6232-497631 http://www.yukonho.de ---(end of broadcast)---

[SQL] unsubscribe

2007-03-20 Thread Stefan
unsubscribe Stefan Ionita ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

[SQL] unsubscribe

2007-03-20 Thread Stefan Ionita
unsubscribe [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ---(end of broadcast)---

[SQL] unsubscribe

2007-03-20 Thread Stefan Ionita
unsubscribe _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ---(end of broadcast)--- TIP 4: Have you sear

[SQL] unsubscribe

2007-03-14 Thread Stefan Ionita
unsubscribe _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ---(end of broadcast)--- TIP 3

[SQL]unsubscribe

2007-03-14 Thread Stefan
unsubscribe ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Selecting exactly one row for each column value

2007-03-06 Thread Stefan Becker
elect distinct on (a) * from tab order by a; a | b | c ---+---+--- 1 | 2 | 3 2 | 3 | 4 5 | 6 | 7 (3 rows) my regards, Stefan -- email: [EMAIL PROTECTED] tel : +49 (0)6232-497631 http://www.yukonho.de ---(end of broadcast)--- TIP 9: In ver

[SQL] how do I to generate a sequence Range or Set of integer constants

2007-02-23 Thread Stefan Becker
d,x.A,x.B,x.C, from MyDataTable x left outer join ( select MissingValues from "1 to 1000" of integers ) IntSeq on MissingValues=x.UniqIntId I'm hoping that someone has done this and might be able to point to some function or methode to do this Thanks, Stefan Becker -- email: [

[SQL] Querying for name/value pairs in reverse

2006-07-15 Thread Stefan Arentz
I'm no SQL expert by any means so I'm wondering if something like this is possible. I have two tables like this: create table Errors ( Id serial not null, CreateDate timestamp not null, primary key (Id) ); create table ErrorValues ( Id serial not null, ErrorId int not null, Name varchar(2

Re: [SQL] regarding join

2006-03-25 Thread Stefan Becker
| tgrt 11 | rregsewf 12 | edrgeef (6 rows) => select * from CC order by name; id | name +--- 1 | 1243f 7 | 243f 2 | asdfef 4 | btgrt 5 | crregsewf 9 | dbsfd 12 | edrgeef 3 | fdbsfd 11 | rregsewf 8 | sdfef 10 | tgrt 6 | xedrgeef (12 rows) by best regards, St

Re: [SQL] group by function, make SQL cleaner?

2006-03-18 Thread Stefan Becker
this should work, # SELECT date_trunc('day',endtime),count(*) FROM eg_event where endtime >= '2006-02-01' and endtime < '2006-03-01' GROUP BY 1 ORDER BY 1; best regards, Stefan Am Donnerstag, 16. März 2006 06:18 schrieb Bryce Nesbitt: &

[SQL] rowcount for all tables

2006-03-18 Thread Stefan Meyer
i have a beginner question and i have read the FAQs. is there a faster ways than select count(*) from foo; to get the rowcount for the tables in my db ? Stefan ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Avoid querying a specific field - how?

2006-02-21 Thread Stefan Schwarzer
Hi, does anyone know how to build a query that SELECTs all fields but not a specific one? I have a couple of tables, holding statistical information as well as the geospatial one (via Postgis). When I query the table I'd like to query only the statistical part - not the geospatial, which

Re: [SQL] ids from grouped rows

2005-07-24 Thread Weinzierl Stefan
e highest age in each group - > > Ideally, it would be something like this > > SELECT name, MAX(age), id_for_row_with_max_age > FROM Person > GROUP BY name SELECT name, age, id FROM Person RIGHT JOIN (SELECT name, MAX(age) AS m FROM Person GROUP BY name) AS t ON (P

Re: [SQL] customising serial type

2005-06-27 Thread Stefan Becker
idinteger default nextval('seq_xeingang'), buchchar not null, eingdt date not null, jnr integer not null, grp integer, code integer not null ); my best regards.. Stefan ---(

Re: [SQL] Links between rows in a table

2005-03-06 Thread Stefan Weiss
lower than one > query on a bigger table, but youu save precious cache space, so in the end > it could be faster. Thank you for your insight. We will rename the columns, add the CHECK and go ahead with this setup. regards, stefan weiss ---(end of broadcast)-

Re: [SQL] Links between rows in a table

2005-03-06 Thread Stefan Weiss
ding to the MySQL documentation, "Rudimentary support for triggers is included beginning with MySQL 5.0.2". The MySQL compatibility requirement is none of my doing, I have given up trying to educate my customers about the benefits of a real database... regards, stefan weiss ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[SQL] Links between rows in a table

2005-03-05 Thread Stefan Weiss
ntioned above? We are also thinking of precalculating possible connection chains, or trees, at night (to a certain depth) in order to avoid performance problems in the peak hours. Any ideas on how such precalculated results could be stored and queried efficiently? Thanks in advance, Stefa

Re: [SQL] A transaction in transaction? Possible?

2004-11-11 Thread Stefan Weiss
On Thursday, 11 November 2004 09:23, Gaetano Mendola wrote: > Stefan Weiss wrote: > > These tables are connected by foreign keys, but without "on delete" > > triggers. > > Why "without" ? Are you looking to solve a problem introduced by > yourself ?

Re: [SQL] A transaction in transaction? Possible?

2004-11-10 Thread Stefan Weiss
called as many times as BEGIN, we send a real commit (errors and ROLLBACK are handled too, of course). It's not perfect, but it does what we need. Savepoints are a nice feature, but I don't think they could help us here. cheers, stefan ---(end of broadcast)-

Re: FW: [SQL] "=" operator vs. "IS"

2004-06-28 Thread Stefan Weiss
comparison with NULL. The only question left is why "IS" can also be used to compare with the TRUE/FALSE keywords (when a simple "=" should be sufficient here), but not to compare two boolean columns. cheers, stefan BTW, I really liked Mike's exp

[SQL] "=" operator vs. "IS"

2004-06-28 Thread Stefan Weiss
qual" any value, and the expression should be read as "foo.bar is unknown"? Or is there something else I'm missing? If it's the "unknown" part, then why can't I use "=" to compare with TRUE or FALSE? cheers, stefan ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Formatting problems with negative intervals, TO_CHAR

2004-06-07 Thread Stefan Weiss
like a very useful and flexible way to do date/time formatting. Tnx, stefan ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] \df

2004-05-07 Thread Stefan Weiss
pg_catalog.pg_function_is_visible(p.oid) AND p.proname ~ '^alt_to_iso$' ORDER BY 2, 3, 1, 4; ** List of functions Result data type | Schema |Name| Argument data types --+++-------

[SQL] Counting rows from two tables in one query

2004-04-09 Thread Stefan Weiss
Is it possible to get a list like the one above with a single query? thanks, stefan ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] [postgres] Foreign Key

2003-10-14 Thread Stefan Sturm
Ist halt noch in der Entwicklung. Direkt auf der Datenbank mit psql hat es auf Anhieb geklappt. Hat keine Sekunde gedauert. Jetzt frage ich mich, warum? Grüße, Stefan Wenn Sie Ihr Abonnement fuer diese Gruppe kuendigen moechten, senden Sie eine E-Mail an: [EMAIL PROTECTED] Die Nut

[SQL] [postgres] Foreign Key

2003-10-14 Thread Stefan Sturm
ERRABLE; Jetzt bekomme ich immer die Fehlermeldung: ERROR: Query was cancelled. Und das war auch schon alles. Kann mir da einer Helfen? Danke und Grüße, Stefan Sturm PS: Ich mache das ganze mit dem Programm EMS PostgreSQL Manager Version 1.8.0.1 Wenn Sie Ihr Abonnement fuer diese Gruppe kuendigen m

Re: [SQL] [postgres] Foreign Key

2003-10-14 Thread Stefan Sturm
; From: Stefan Sturm [mailto:[EMAIL PROTECTED] > Sent: Monday, October 13, 2003 12:48 PM > To: [EMAIL PROTECTED] > Subject: RE: [SQL] [postgres] Foreign Key > > Hallo, > > > > In der Tabelle status befinden sich Datensätze. Die Tabelle logins > > ist > &

Re: [SQL] [postgres] Foreign Key

2003-10-14 Thread Stefan Sturm
Sorry für die letzte Mail. Habe bei der falschen Mail auf Antwort geklickt. Nochmals Sorry, Stefan > -Original Message- > From: Stefan Sturm [mailto:[EMAIL PROTECTED] > Sent: Monday, October 13, 2003 12:48 PM > To: [EMAIL PROTECTED] > Subject: RE: [SQL] [postgres] Foreign

Re: [SQL] [postgres] Foreign Key

2003-10-14 Thread Stefan Sturm
ersion, desto weniger ;-) Ich verwende die Version 7.3.4. Das sollte doch wohl reichen, oder? > Evtl. sind auch die Anführungszeichen ein Problem. Habe es auch ohne versucht, das gleiche Problem. Ich werde es jetzt mal mit psql, direkt auf dem Server testen. Vielleicht geht es ja dann. G

Re: [SQL] LEAST and GREATEST functions?

2003-07-02 Thread Stefan Bill
ehavior. I am running v7.3.2. All help is appreciated, and please keep up the discussion about the ability to create functions with variable number of arguments (LEAST, GREATEST, etc.). I could see the potential for wanting to write these in the future. Cheers, -Stefan

Re: [SQL] LEAST and GREATEST functions?

2003-07-01 Thread Stefan Bill
another N number of functions for different datatypes (int, float, date, etc.). In addition to adding the LEAST and GREATEST functions, the PostgreSQL developers should add the ability to create user-defined functions with a variable number of arguments. Cheers, -Stefan __

[SQL] LEAST and GREATEST functions?

2003-06-30 Thread Stefan Bill
, -Stefan __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] loop query results

2002-12-04 Thread Stefan Reuschke
--- 0 (1 row) -- and the result as expected: select * from varlaenge; id_var | var_text +- 1 | text 1X 2 | text 2X 3 | text 3X 4 | text 4X 5 | text 5X 6 | tex

Re: [SQL] [GENERAL] id and ID in CREATE TABLE

2002-07-19 Thread stefan
cases are bad ? Why then Oracle , IBM is using them and why the SQL standard is not changed ? stefan On Fri, 19 Jul 2002, Martijn van Oosterhout wrote: > On Sat, Jul 20, 2002 at 10:39:52AM +0300, [EMAIL PROTECTED] wrote: > > > > I forgot about "" Sorry. So if I would

Re: [SQL] id and ID in CREATE TABLE

2002-07-18 Thread stefan
uote it. Why is like this ? Why not letting them upper case if they are not quoted ? stefan On Sat, 20 Jul 2002 [EMAIL PROTECTED] wrote: > > Hello all, > > It might be not a correct place to post this. I am creating a table from > psql. Everything is fine except I got some

[SQL] id and ID in CREATE TABLE

2002-07-18 Thread stefan
e column name ID ? Like in the first case. 3. How comes that first using psql I cannot create the column name ID but using pgaccess I can ? Is this a bug ? Some ideas ? stefan ---(end of broadcast)--- TIP 2: you can get off all lists at on

Re: [SQL] system maintained keys

2001-10-23 Thread Stefan Lindner
Thank you very much! Thanks to all who answered! An I will never again ask silly questions here :-) "Stefan Lindner" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 9qf06v$20bh$[EMAIL PROTECTED]">news:9qf06v$20bh$[EMAIL PROTECTED]... > Is there any way to get system maintai

[SQL] system maintained keys

2001-10-19 Thread Stefan Lindner
Is there any way to get system maintained keys from postgres? e.g. to have a table with a primary key column (varchar or int) and let postgres chose the next unique value for this column? ---(end of broadcast)--- TIP 6: Have you searched our list