Re: [SQL] RI permission problem

2001-05-07 Thread Peter Eisentraut
Kyle writes: > Shouldn't the select access to the view trickle down to subordinate select functions? I would think not. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 4: Don&#x

Re: [SQL] Is function atomic?

2001-07-07 Thread Peter Eisentraut
isted there: that's why I asked. Is everything on that list planned > for 7.2? No. The TODO list is just a list of random ideas, some better than others. Most seasoned developers have their own private lists of things that they would like to get done. -- Pete

Re: [SQL] PL/TclU

2001-07-06 Thread Peter Eisentraut
afe to offer it to normal users. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
ide the database may obviously have different semantics. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail c

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
, but there may be issues if you modify global state or there is a serialization failure. These are the same issues that you have to deal with in any programming environment. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)-

Re: [SQL] Is function atomic?

2001-07-06 Thread Peter Eisentraut
n? See LOCK command. But note that this would lock out process in this function or any other access to these tables. Maybe you should take a look at the userlock module in contrib. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter

Re: [SQL] While Using COPY COMMAND ...

2001-07-06 Thread Peter Eisentraut
server is probably running under a different user id (postgres?). -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] finding current oid

2001-07-06 Thread Peter Eisentraut
postgresql writes: > Is there a way to return the current oid of a transaction? Transactions don't have oids, only table rows do. The libpq function PQoidValue() will possibly give you the last affected oid. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.ne

Re: [SQL] CREATE TYPE function examples

2001-07-10 Thread Peter Eisentraut
is seems to be outdated regarding the fmgr update, though. (Hint, hint...) -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister com

Re: [SQL] ERROR: Procedures cannot take more than 16 arguments

2001-07-10 Thread Peter Eisentraut
the comments there. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] can we write to a flat file from Postgresql procedure

2001-07-11 Thread Peter Eisentraut
R Vijayanath writes: > It would be great if you can tell me if I can write a > procedure that can write the output to the OS(Linux > OS) file. You could try out PL/sh for that. http://www.postgresql.org/~petere/plsh.html YMMV -- Peter Eisentraut [EMAIL PROTECTE

Re: [SQL] How can we match a condition among 2 diff. tables?

2001-07-13 Thread Peter Eisentraut
ee WHERE emp_id NOT IN (SELECT emp_id FROM salesorder); or, slightly uglier but possibly faster SELECT * FROM employee WHERE NOT EXISTS (SELECT 1 FROM salesorder WHERE salesorder.emp_id = employee.emp_id); -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter --

Re: [SQL] Hey! ORDER BY in VIEWS?

2001-07-15 Thread Peter Eisentraut
Josh Berkus writes: > Hey! I thought you couldn't do ORDER BY in views ... yet I just did. > Is this a new thing, or am I just getting my Trasact-SQL and my > PostgreSQL mixed up again? I think it was allowed from 7.1 on to enable LIMIT in views to work sensibly. -- Peter Eisen

Re: [SQL] Cross database foreign keys

2001-07-06 Thread Peter Eisentraut
Morgan Curley writes: > Does anyone know if it is possible to connect to a differernt db from > within a plsql function. > I have multilple inter-related schemas and want to enforce some fk > relationships. Not possible -- Peter Eisentraut [EMAIL PROTECTED] http://funktur

Re: [SQL] interpreting attributes in pg_class

2001-07-16 Thread Peter Eisentraut
ge/docs/7.1/postgres/catalog-pg-class.html -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] First steps in plpgsql - language not recognized?

2001-07-17 Thread Peter Eisentraut
man createlang -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Peter Eisentraut
Chris Ruprecht writes: > I need to know how I can access a flat file from within a PL/PGSQL script. You can't. PL/TclU could help you there. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of b

[SQL] Re: Date Time Functions - ANSI SQL ?

2001-08-05 Thread Peter Eisentraut
in a number of other cases. We don't all program in ANSI C or C++ these days either. What is portable is a bit of a matter of experience and research, modulo good code organization so you can replace the unportable parts easily. -- Peter Eisentraut [EMAIL PROTECTED] http://funktur

[SQL] Re: Fuzzy matching?

2001-08-05 Thread Peter Eisentraut
lished in an academic work. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Peter Eisentraut
do better. One day we will have to accept the fact that months and seconds must not be mixed, period. You can have year/month intervals or day/hour/minute/second intervals, not a combination. An interval of '5 years 3 minutes' has no meaning with the natural calendar rules. -- Peter

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Peter Eisentraut
here: select interval '1 year 00:00:03' = interval '360 days 00:00:03' ; ?column? -- t > The real bogosity in the interval type is that months and seconds are > not sufficient: it should be months, days, and seconds. As we get > reminded twice a year by the r

Re: [SQL] Referencing named attribute in where clause doesn't workwith 7.1.2?

2001-08-08 Thread Peter Eisentraut
gt; having -> select -> order Any names generated by an element on the right cannot be in scope in elements on the left. (In some cases it might work as a convenience anyway, but not in your case.) I think you might be better off writing this query as a proper

Re: [SQL] Interval FAQ - please review

2001-08-16 Thread Peter Eisentraut
> '1999-12-11'::TIMESTAMP + '19 days'::INTERVAL = '1999-12-30'::TIMESTAMP > 3. You may add or subtract two INTERVALS: > '1 month'::INTERVAL + '1 month 3 days'::INTERVAL = '2 months 3 days' > INTERVAL You should proba

Re: [SQL] pg_ctl start hangs

2001-08-20 Thread Peter Eisentraut
Christophe Labouisse writes: > /usr/local/bin/pg_ctl start -s -w -l /usr/local/pgsql/errlog -o "-i" Don't use the -w option. Read the man page. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter --

Re: [SQL] Altering pg_conndefaults

2001-08-22 Thread Peter Eisentraut
y from interface to interface. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Why is GROUP BY required when aggregate function used?

2001-08-28 Thread Peter Eisentraut
1 | 5 6 | 2 7 | 8 What should SELECT a, count(b) FROM t1 return? -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (se

Re: [SQL] GRANT ALL ON TO GROUP failure

2001-08-29 Thread Peter Eisentraut
anting SELECT to READER > psql:pg-def-group-grant.sql:69: ERROR: non-existent group "reader" Did you create a group named "reader"? -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--

Re: [SQL] getting the oid for a new tuple in a BEFORE trigger

2001-08-30 Thread Peter Eisentraut
use tg_newtuple of the TriggerData structure passed to thetrigger function, > and its t_data -> t_oid will have the value '0'. A less hackish way to do this might be using a sequence object for the primary key and fetch the next sequence value manually. -- Peter Eis

Re: [SQL]

2001-09-03 Thread Peter Eisentraut
ld2 FROM table2; -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] More on the TO DO wishlist

2001-09-03 Thread Peter Eisentraut
r most/all of these languages, and XEmacs has a built-in PostgreSQL client module, one could write a minor mode for PG procedural languages that quote-escape the buffer and load it into the server. You heard it here first! -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.hom

Re: pl/sh (was Re: [SQL] calling a shell script from pl/pgsql)

2001-09-10 Thread Peter Eisentraut
Alex Pilosov writes: > Actually, I remember that Jan once mentioned something about pl/SH. I > don't know what's the status of it? http://webmail.postgresql.org/~petere/plsh.html It's a toy project of mine. It's usable, but there are probably some portability probl

Re: [SQL] cache lookup failed

2001-09-12 Thread Peter Eisentraut
OR: fmgr_info: function 20086: cache lookup failed Possibly you have dropped and recreated the plpgsql language handler after the function was already created. If so, recreate the function. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(

[SQL] plpgsql function case statement

2001-09-12 Thread Peter Schmidt
t includes the variable "wm". Here's what I came up with...but it's clearly not very efficient... Can anyone help? TIA Peter create function updateLastUsed(text, text) returns integer as ' declare wm integer;

Re: [SQL] query time

2001-09-13 Thread Peter Eisentraut
Esteban Gutierrez Abarzua writes: > I need to know.. How can I get running query time ? time psql -c 'query here;' -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TI

Re: [SQL]

2001-09-14 Thread Peter Eisentraut
Bhuvan A writes: > SELECT EXTRACT(EPOCH FROM TIMESTAMP(now())); > date_part > > 1000467997 > (1 row) > > Fine.. > > Similarly, how could i get timestamp value for these SECONDS? TIMESTAMP 'epoch' + INTERVAL 'N seconds'

Re: [SQL] Registring a C function in PostgreSQL

2001-09-19 Thread Peter Eisentraut
Miguel González writes: > ERROR:/load of file /home/postgres/ctof.so failed: /home/postgres/ctof.so > ELF file´s phentsize not the expected size. You probably didn't compile or link the code correctly. See the PostgreSQL Programmer's Guide for information. -- Peter Eis

Re: [SQL] temporary views

2001-10-07 Thread Peter Eisentraut
rate on the SQL standard behaviour. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] VARCHAR vs TEXT

2001-10-16 Thread Peter Eisentraut
Bruce Momjian writes: > TEXT limit is 1GB, as shown on the 'limits' FAQ item. Is it worth > mentioning here? CHAR()/VARCHAR() also 1GB limit. It is already mentioned there. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter --

Re: [SQL] SQL CONSTRAINTS - Constraining time values from two

2001-10-05 Thread Peter Eisentraut
20651 1 insert into test values ('12:00', '9:45'); ERROR: ExecAppend: rejected due to CHECK constraint $1 -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 2: you c

Re: [SQL] Localization

2002-07-07 Thread Peter Eisentraut
ase, the current state of the French translation is pretty limited. Feel free to help. > It should be useful for final users who don't read Shakespeare in the > original version ;) But it's so much better. :) -- Peter Eisentraut [EMAIL PROTECTED]

Re: [SQL] bit field changes in 7.2.1

2002-07-07 Thread Peter Eisentraut
to the right length, in which case you could use something like substring(computation() || b'00' for 6) The question whether the constant should go before or after the computation, and whether it should be zeros or ones is a matter of taste, which is why an example has be

Re: [SQL] Seeding

2002-07-15 Thread Peter Eisentraut
st thing you're going to have to define is what you mean with "every 2500", because records in tables are not ordered. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the

[SQL] Return Primary Key from Procedure

2002-07-24 Thread Peter Atkins
All, I have two tables t_proj, t_task see below: CREATE TABLE t_proj ( proj_id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (proj_id), task_id integer(12), user_id integer(6), title varchar(35), description varchar(80) ); CREATE TABLE t_task ( task_id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (task_

[SQL] Returning PK of first insert for second insert use.

2002-07-29 Thread Peter Atkins
All, I have two tables t_proj, t_task see below: CREATE TABLE t_proj ( proj_id SERIAL NOT NULL, PRIMARY KEY (proj_id), task_id integer(12), user_id integer(6), title varchar(35), description varchar(80) ); CREATE TABLE t_task ( task_id SERIAL NOT NULL, PRIMARY KEY (task_id), title varchar(35),

Re: [SQL] Returning PK of first insert for second insert use.

2002-07-29 Thread Peter Atkins
Thank you for explaining that in detail it makes sense now. I'll give it a try. Thanks again! -p -Original Message- From: Ken Corey [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 1:05 PM To: Peter Atkins Cc: '[EMAIL PROTECTED]' Subject: RE: Returning PK of first in

[SQL] Returning PK of first insert for second insert use.

2002-08-02 Thread Peter Atkins
All, I have two tables t_proj, t_task see below: CREATE TABLE t_proj ( proj_id SERIAL NOT NULL, PRIMARY KEY (proj_id), task_id integer(12), user_id integer(6), title varchar(35), description varchar(80) ); CREATE TABLE t_task ( task_id SERIAL NOT NULL, PRIMARY KEY (task_id), title varchar(35),

[SQL] Delete function without knowing the elements

2002-08-13 Thread Peter Atkins
All, I created a function that I can't seem to delete. [no sure how many parameters] CREATE OR REPLACE FUNCTION insertEntry (int4, varchar, varchar, numeric, varchar, timestamp, varchar, int4, numeric, varchar, int4, ,) RETURNS INT4 AS ' .

Re: [SQL] Update Help

2002-09-03 Thread Peter Eisentraut
SET price = (SELECT price FROM second_table WHERE second_table.productid = first_table.productid); Possibly the answer is also to redesign your schema to avoid redundant data. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: i

[SQL] Changing Column Type

2002-09-09 Thread Peter Atkins
All, Is there a way to easily change the type of column? Or do I have to drop and create again. From: assignment_notes | character varying(255) To: assignment_notes | text Thanks, -p ---(end of broadcast)--- TIP 1: subscribe and unsubscribe co

[SQL] Passing array to PL/SQL and looping

2002-09-26 Thread Peter Atkins
All, I'm a newbie to PL/SQL and need help badly. I'm trying to pass my array of id's to the function and then loop through until the array is empty. I know there must be atleast five things I'm doing wrong. Please help! Cheers, -p Call to Procedure and Array: $myArray = array(15, 6, 23); se

[SQL] how do i insert an empty string ?

2002-10-15 Thread Peter Galbavy
$dbh->quote() returns two single quotes, which fails because something along the way thinks this is a single quote. I do NOT want to insert a NULL but an empty string... (This is either doing a $dbh->do(...) or a prepare ... execute without $dbh->quote()) Peter ---

Re: [SQL] how do i insert an empty string ?

2002-10-15 Thread Peter Galbavy
Sorry: 7.3 beta 2 on OpenBSD 3.2 Peter - Original Message - From: "Peter Galbavy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 11:01 AM Subject: [SQL] how do i insert an empty string ? > FAQ: A search yielded nothing explici

Re: [SQL] IGNORE ME how do i insert an empty string ?

2002-10-15 Thread Peter Galbavy
Please ignore me for now. The string is NOT empty, but full of NUL characters. My bad for not using 'less' to view the output... Peter - Original Message ----- From: "Peter Galbavy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002

Re: [SQL] Messy Casts, Is there a better way?

2002-10-15 Thread Peter Eisentraut
Larry Rosenman writes: > I have a table with the following, in part: > > contract_start date > contract_term int (term in MONTHS) Store contract_term as interval? -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)-

[SQL] 'fake' join and performance ?

2002-10-22 Thread Peter Galbavy
I *know* I have shot myself in the foot somehow, but my initial reaction was that the optimiser should just make the 'fake' (i.e. unreferenced) reference to another table go away... peter ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] 'fake' join and performance ?

2002-10-22 Thread Peter Galbavy
> many times as there are rows in the images table. There is no such > thing as an "unreferenced" FROM entry as far as SQL is concerned. Sounds about right. Thanks for the clarification. Peter ---(end of broadcast)--- TIP 3: if po

Re: [SQL] BOOLEAN question

2002-10-29 Thread Peter Eisentraut
arison operators defined for boolean, but that doesn't make it right.) What seems more reasonable is to define conjuntion and disjunction aggregates, which would mostly do the same thing but their semantics wouldn't be as controversial. -- Peter Eisentraut [EMAIL PROTECTED]

Re: [SQL] bigger problem

2002-11-11 Thread Peter Eisentraut
use Oracle. In Oracle, '' is the same as null, so the constraint is not satisfied. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail c

[SQL] help optimise this ?

2002-11-21 Thread Peter Galbavy
est matches my min/max criteria. I have not - and will leave for now - the case where a cropped image results in a scale change between width and length such that the min/max test returns a different set of rows for each dimension. Argh. And help given is greatly appreciated. rgds, -- Peter

Re: [SQL] help optimise this ?

2002-11-21 Thread Peter Galbavy
Wow. Three people have replied with an effectively identical solution. Why didn't I think of this ? Answers on a postcard to... Thanks to all that have replied. Peter - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Peter Galbavy" <[EMAIL

Re: [SQL] copy from command - quotes and header lines

2002-11-26 Thread Peter Eisentraut
three header > lines. It would be convenient if the COPY FROM command had another > parameter eg "HEADERS n" meaning skip first n lines of input file. > My current workaround uses a perl pipe but I would prefer a cleaner > solution. What's unclean about that? -- Peter E

Re: [SQL] Question on SQL and pg_-tables

2002-11-27 Thread Peter Childs
d methods. Which means using standard libraries is a waste of time. Perhaps we need a standard set of "views" to tell us the meta data then to get at the meta data in a different database all you would need to do is reimplemented the views but this is rather a dirty solution. To something which is missing in the standard Peter Childs ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] handling error in a function

2002-12-17 Thread Peter Gabriel
i can handle it, in Oracle nearly the same ...) Please help :-) Regards, peter -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Need help paging through record sets

2002-12-21 Thread Peter Galbavy
should be fine for most medium sized servers I guess. Peter - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:53 PM Subject: [SQL] Need help paging through record sets Hello everyone, and thanks for reading my first ne

[SQL] weighting (the results of) a query ?

2003-01-05 Thread Peter Galbavy
e fine too. I would like to minimise the number of queries to the DB, but I can fall back on doing one query per column and combining the results in perl. This is my approach for an initial implementation later today unless anyone can suggest otherwise... Any pointers, tips,

Re: [SQL] weighting (the results of) a query ?

2003-01-07 Thread Peter Galbavy
ade it work OK. Not sure yet on real world performance, but that's what tuning is for :) Hope someone finds this in the archive and finds it useful. Peter - Original Message - From: "Peter Galbavy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January

Re: [SQL] weighting (the results of) a query ?

2003-01-07 Thread Peter Galbavy
I want it returned only once... Peter ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] weighting (the results of) a query ?

2003-01-07 Thread Peter Galbavy
> I think your query might fail on that requirement regardless, no? At > least I missed how you'd prevent it. I have had about 10 minutes to play with this - my day jobrequires I do real testing when I get home later tonight :) Thanks, and I will keep an eye out for this and figure a way around

Re: [SQL] RFC: A brief guide to nulls

2003-01-15 Thread Peter Eisentraut
tradict those three statements. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] function defination help ..

2003-02-21 Thread Peter Eisentraut
Rajesh Kumar Mallah writes: > is it possible to get the function creation defination as produced by pg_dump > by some SQL queries on system catalogs? > > pg_func stores procsrc but i am trying to get RETURNS and the arg part also. You will need to reconstruct what pg_dump does

Re: [SQL] 7.3 "group by" issue

2003-02-21 Thread Peter Eisentraut
in might contain added null values. Of course you are using an inner join, but the constructs work the same either way.) -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Complex outer joins?

2003-03-24 Thread Peter Childs
table this query can be rewritten as select G.SELID, G.TEXT, L.ID as SELLEVELID , L.SELLEVEL, L.LEVELJOIN, L.LEVELTEXT, C.ID as KRITERIENFELDID, C.SELFLD from table as G, table as L, table as C where and G.SELID = L.SELID and L.SELID = C.SELID and L.SE

[SQL]

2003-05-28 Thread Peter Lavender
[EMAIL PROTECTED] Cc: Bcc: Subject: Re: [PERFORM] [SQL] Unanswered Questions WAS: An unresolved performance Reply-To: [EMAIL PROTECTED] In-Reply-To: <[EMAIL PROTECTED]> X-Operating-System: Linux/2.4.18-686-smp (i686) X-Uptime: 21:03:03 up 8 days, 22:55, 8 users, load average: 1.00, 1.00, 1.00

Re: [SQL] Failed to initialize lc_messages to ''

2003-07-01 Thread Peter Eisentraut
to initialize lc_messages to '' > ok > copying template1 to template0... Failed to initialize lc_messages to '' > ok > > > 4) /usr/local/pgsql/bin/postmaster -D /var/lib/postgres/my_cz_db > > Postmaster returned: > > Failed to initialize lc_message

Re: [SQL] date question

2003-06-17 Thread Peter Eisentraut
x27;1 month' + day * interval '1 day' This results in a timestamp value that you can compare to or assign to a date value. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desir

Re: [SQL] [HACKERS] Our FLOAT(p) precision does not conform to spec

2003-06-17 Thread Peter Eisentraut
a hazard of some > existing app asking for (what it thinks is) float8 and getting float4 > instead. Considering that the data type float(x) isn't documented anywhere, I'm not worried. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)-

Re: [SQL] time delay function

2003-07-22 Thread Peter Eisentraut
that, for example by calling sleep(). -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] [OT] Frontend recommendations

2003-07-25 Thread Peter Childs
(Thats under Linux...) If you need a quick gui try pgaccess and the like. If you want to writea full gui pick you favoute language and there should be some postgres drivers (if all else fails there is always ODBC) somthing like perl or python may be nice and platform independant..

Re: [SQL] now 7.2.3 - 7.3.3

2003-07-30 Thread Peter Eisentraut
A. Van Hook writes: > this worked in 7.2.3 > "select sum(cr) from ar where date(tdate) = now() -1 " > but not in 7.3.3 > What's the proper syntax for 7.3.3??? now() - interval '1 day/minute/year/second/???' -- Peter Eisentraut [EMAIL PROTECTED] ---

Re: [SQL] Changing data type must recreate all views?

2003-08-19 Thread Peter Eisentraut
ithout touching views and triggers? Not really. Perhaps it will be easier if you do a dump of the affected objects, edit the dump file, and reload. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase

Re: [SQL] Configuring Problem on Solaris............

2003-08-20 Thread Peter Eisentraut
g shared libraries. Check the file 'config.log' > *** for the exact reason. Please check the file 'config.log' for the exact reason. It may be a problem related to locating certain shared libraries. The archives contain several instances where this problem is dicussed.

Re: [SQL] Equality operators on NULL values

2003-08-24 Thread Peter Eisentraut
le? No, but why not write (a = b) or (a is null and b is null) -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Trigger functions w/o pgsql ?

2003-09-01 Thread Peter Eisentraut
on can't return) ? Internal reasons mostly, but not trivial to overcome. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEm

Re: [SQL] [BUGS] session variable

2003-09-03 Thread Peter Eisentraut
ables. > so i declared sufficient triggers which write to the log-table. > > and now i want to mark each log-record with the "operator_id" > (e.g. to log who made an update) > > what possible ways are there ? > > if i use temp table to inform the triggers about &

Re: [SQL] how to vacum

2003-09-10 Thread Peter Eisentraut
Richard Sydney-Smith writes: > Tried to issue the command "vacum full" both from psql and the sql box in pgadmin > without success. vacuum full; ^^ -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9:

Re: [SQL] A generic trigger?

2003-09-14 Thread Peter Childs
There are some scripting languages where somthing don't work hense why I chose pl/python The trigger/function is below although it should be in the archives somwhere as well. Full problem with it can be seen of Bugs Peter Childs -- CREATE TABLE history ( tab t

Re: [SQL] change a field

2003-09-14 Thread Peter Eisentraut
Patrick Meylemans writes: > What is the best way to solve this problem ? Show us your code. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (s

Re: [SQL] sub query

2003-09-20 Thread Peter Eisentraut
t; WHERE p.product_id = o.item_product_id > GROUP BY o.item_order_num > ORDER BY o.item_order_num; > > Error: Attribute o.item_status must be GROUPED OR USE IN an aggregate > function Add o.item_status to the GROUP BY clause. -- Peter Eisentraut [EMAIL PROTECTED]

Re: [SQL] RFC: i18n2ascii(TEXT) stored procedure

2003-09-25 Thread Peter Eisentraut
Michael A Nachbaur writes: > a) am I missing any characters that need to be converted? In Unicode, any character can be dynamically combined with any number of accent characters, so an enumerated list will never do. -- Peter Eisentraut [EMAIL PROTECTED] ---(end

Re: [SQL] Creating Index

2003-10-01 Thread Peter Eisentraut
it all the rows in the table. Then again, I don't quite believe that visiting 9000 rows takes 13 seconds. Can you show us the result of EXPLAIN ANALYZE and your real table and view definitions, because the ones you showed contained a few syntax errors. -- Peter Eisentrau

Re: [SQL] FK Constraints, indexes and performance

2003-10-05 Thread Peter Childs
eys so that they could be used for an extra preformace gain. but a think that may have got on the todo list. Peter Childs > > The reason I think PG is doing sequential scans is because the execution > plan for the following query shows two sequential scans: > explain select * > fro

Re: [SQL] get diagnostics not supported by ecpg?

2003-10-14 Thread Peter Eisentraut
Slava Gorski writes: > What am I doing wrong? Or it's just not supported by ecpg in 7.3? Indeed. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[SQL] [postgres] Deutsche PostgreSQL-Mailingliste unter postgresql.org

2003-10-20 Thread Peter Eisentraut
also davon, die ganze Operation dorthin zu verlegen? -- Peter Eisentraut [EMAIL PROTECTED] Wenn Sie Ihr Abonnement fuer diese Gruppe kuendigen moechten, senden Sie eine E-Mail an: [EMAIL PROTECTED] Die Nutzung von Yahoo! Groups ist Bestandteil von http://de.docs.yahoo.com/info/utos.html

[SQL] [postgres] Re: Deutsche PostgreSQL-Mailingliste unter postgresql.org

2003-10-21 Thread Peter Eisentraut
an [EMAIL PROTECTED] senden. Peter Eisentraut writes: > Hallo Allerseits, > > ich habe mit Marc Fournier vereinbart, dass wir eine deutsche > PostgreSQL-Mailingliste unter postgresql.org anlegen können. Ich denke, > das würde der Einheitlichkeit des Auftretens entgegen kommen, z

Re: [SQL] Expressional Indexes

2003-10-22 Thread Peter Eisentraut
Tom Lane writes: > Mainly that "expressional" is a made-up word. At least it's better than "functional index", because I had always wondered where the dysfunctional indexes went. :) I like "expression index". -- Peter Eisentraut [EMAIL PROTECTED

Re: [SQL] List table with same column name

2003-10-23 Thread Peter Childs
ded for 7.3. 2> Do you really need to know that column a in table 1 also appears in table 1? Peter Childs > > > > > Thanks > > > > > > ---(end of broadcast)--- > > TIP 4: Don't 'kill -9' the po

Re: [SQL] List table with same column name

2003-10-23 Thread Peter Childs
On Thu, 23 Oct 2003 [EMAIL PROTECTED] wrote: > On Thu, 23 Oct 2003, Peter Childs wrote: > > > > > > > On Thu, 23 Oct 2003 [EMAIL PROTECTED] wrote: > > > > > On Thu, 23 Oct 2003, Abdul Wahab Dahalan wrote: > > > > > > > Hi! > >

Re: [SQL] Error message during compressed backup

2003-10-24 Thread Peter Eisentraut
l_handler'; which gives you the ID of the user that owns this function. Then run select * from pg_user; to get the list of valid users. You may want to adjust the owner of the function to a valid user (use UPDATE). -- Peter Eisentraut [EMAIL PROTECTED] ---

Re: [SQL] Programatically switching database

2003-11-15 Thread Peter Eisentraut
ns on db1, db2 ... dbn. Nothing prevents you from keeping the connection to db1 open when you open a connection to db2. By the way, psql's "\c" command does exactly disconnect-from-db1-connect-to-db2. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)

Re: [SQL] Programatically switching database

2003-11-15 Thread Peter Eisentraut
ions, if there was a way to "switch db" (or to do a cross-db query). I'm afraid that what you want to do is not possible. Perhaps you want to organize your data into schemas, not databases. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)-

<    1   2   3   4   5   >