Re: [SPAM] Re: [SQL] Permissions not working

2004-05-03 Thread Peter Eisentraut
Pallav Kalva wrote: > I tried both database privileges and table privileges (all and > select) it still doesnt work. Not sure > what is wrong here, I tried logging in as both postgres and usps user > and both them doesnt work. What about all those groups that have privileges? Please post the

Re: [SQL] Permissions not working

2004-05-01 Thread Peter Eisentraut
Pallav Kalva wrote: > Also here is the privileges information from information_schema > tables. Is there a way to REVOKE these > privileges ? You need to log in as the user that has granted the privilege you want to revoke. In this case, log in as postgres and do REVOKE ALL FROM PUBLIC;.

Re: [SQL] Record Lock details

2004-04-23 Thread Peter Eisentraut
Am Freitag, 23. April 2004 10:43 schrieb Denis P Gohel: > Is there a data dictionary in Postgres from where i can get the info about > locked rows of any table ? If possible the value of those locked record ? No, this information is not available for end users. > I have an ODBC application workin

Re: [SQL] Server Side C programming Environment Set up

2004-04-23 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 18:07 schrieb Tom Lane: > I agree with the suggestion elsewhere in the thread about generalizing > the contrib Makefile framework to the point that it could be installed > as part of the -devel RPM, and then used to build user-written backend > functions. It seems to

Re: [SQL] Server Side C programming Environment Set up

2004-04-22 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 07:59 schrieb Tom Lane: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > make install-all-headers > > That's not a complete solution though; the headers are only half the > problem. Makefiles are the other half, and our story on them i

Re: [SQL] Server Side C programming Environment Set up

2004-04-22 Thread Peter Eisentraut
Am Donnerstag, 22. April 2004 15:58 schrieb Rod Taylor: > > make install-all-headers > > > > It's explained in the installation instructions. > > That doesn't happen on most platforms in the standard package. It certainly happens in all the packages that have ever come by me (maybe after a little

Re: [SQL] Server Side C programming Environment Set up

2004-04-21 Thread Peter Eisentraut
Kemin Zhou wrote: > IN chapter 33 Extending SQL > 33.7.5 Writing Code > when run pg_config --includedir-server > I got /usr/local/pgsql/include/server but my machine does have this > directory make install-all-headers It's explained in the installation instructions. ---

Re: [SQL] SQL Spec Compliance Questions

2004-04-03 Thread Peter Eisentraut
Josh Berkus wrote: > Just got this "do we support it" questionnaire from a signficant > commercial entity vaguely interested in supporting PostrgreSQL. > Since I'm often foggy on the differences between the SQL99 and SQL92 > spec definitions of things, I thought I'd post it for feedback here: T

Re: [SQL] [pgsql-advocacy] SQL Spec Compliance Questions

2004-04-03 Thread Peter Eisentraut
Josh Berkus wrote: > > 4.16.2 Referenceable tables, subtables, and supertables > > A table BT whose row type is derived from a structured type > > ST is called a typed table. Only a base table or a view can be a > > typed table. A typed table has columns corresponding, in name and > > decla

Re: [SQL] Configure issues

2004-01-13 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: > I am in the process of re-building postgresql 7.4.1, and on running > configure I get the following output, of interest to me is the error > message about ant even though it is installed in /library/ant, so i > don't know why it is complaining. Any ideas?

Re: [SQL] Problems with postgresql 7.4.1 configuration - URGENT

2004-01-13 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: > this all started because I wanted to install pltclu so that I could > gain access to pgmail using tcl. I have re-run the build and even > though I have specified --with-tcl as one of the components of the > build, tcl is not installed in the /lib director

Re: [SQL] Triggers

2004-01-12 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: > does postgresql support the ability to email as in SQL Server? I want > to create a trigger which on input of a record will send out an > email. Is this possible? Write a trigger function in, say, PL/PerlU or PL/sh and have it send the email with the us

Re: [SQL] Left outer join on multiple tables

2004-01-11 Thread Peter Eisentraut
David Witham wrote: > Is there a way to do left outer joins on more than 2 tables at once > (3 in my case)? Or do I have to do the first join into a temp table > and then another join from the temp table to the third table? I can't > seem to work out the syntax from the User Guide. SELECT * FROM a

Re: [SQL] Importation wtih copy generated some wrong registers..

2004-01-07 Thread Peter Eisentraut
Rodrigo Sakai wrote: > I did some importation from a .csv file to a table > > (this is a very small piece of the csv file, but i think its good for > the exemple. the pipe "|" is the delimiter for this file) > 001|002|3041300045027612|002 > 001|002|3041000218146611|002 > 001|002|3040600

Re: [SQL] Notation of index

2004-01-07 Thread Peter Eisentraut
Andreas wrote: > Why can['t] we use INDEX the same way as UNIQUE ? > Perhaps even as in > ... > numba INT4NOT NULLINDEX > ... If the choice were just index or no index, then this might be ok, but when you create an index you can choose the index type, the operator class, a partial in

Re: [SQL] Calendar Scripts - Quite a complex one

2004-01-06 Thread Peter Eisentraut
Kumar wrote: > I am working on Postgres 7.3.4 on RH Linux . For our application, we > are in a position to give calendar function (appointments and > scheduling) with our application. Can somebody suggest me links or > sample scripts for developing the calendar function. You can probably lift out

Re: [SQL] failed to build any 5-way joins

2003-12-16 Thread Peter Eisentraut
Alessandro Depase wrote: > The query generating the error is: This is useless unless we know table schema, what data is in the tables, and what software version you use. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] dump and schema

2003-12-16 Thread Peter Eisentraut
Olivier Hubaut wrote: > I think this won't get the same result he expects. As I know, the > CURRENT_DATE will always give the current day, not the day you > inserted the row. Your knowledge is incorrect. ---(end of broadcast)--- TIP 8: explain anal

Re: [SQL] Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??

2003-12-09 Thread Peter Eisentraut
David B wrote: > We have got used to the problem that queries of the format: > > select * > from customer > where cust_id = '123' are much much faster than > > select * > from customer > where cust_id = 123 > > (where cust_id is defined as bigint). > > a. Why is this. Because in the second case, t

Re: [SQL] Fetch a single record

2003-12-09 Thread Peter Eisentraut
David Shadovitz wrote: > I'm looking for the fastest way to fetch a single record from a > table. I don't care what record it is. > > Here are two techniques I've explored: > > 1. Use LIMIT > SELECT * FROM myTable LIMIT 1 > > 2. Get a valid OID and then get the record. > SELECT MIN(oid) AS anOID FR

Re: [SQL] Values like ''

2003-12-09 Thread Peter Eisentraut
Elielson Fontanezi wrote: > Why does the following query work on pgsql 7.2.3 and not in pgsql > 7.3.4? Please be more detailed on your idea of "works" and "does not work". ---(end of broadcast)--- TIP 7: don't forget to increase your free space

Re: [SQL] How Do I Toggle Quoted Identifiers?

2003-12-04 Thread Peter Eisentraut
ow do I turn case-sensitivity off? There is no setting for that either. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Permissions problem on 7.4

2003-12-01 Thread Peter Eisentraut
lem with my application, so I downloaded > postgresql_autodoc (http://www.rbt.ca/autodoc/) in order to check the > permissions better. > It also claims that group salesmen has the right to SELECT, INSERT and > DELETE on table clients. Report a bug to the authors of that program. -- Peter Eisentraut

Re: [SQL] multiple function declarations

2003-11-17 Thread Peter Eisentraut
ere is usually no reason not to do that. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Multicolum index and primary key

2003-11-17 Thread Peter Eisentraut
ll do it ;-) You could also have read the documentation about multicolumn indexes, because it contains exactly this example. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Programatically switching database

2003-11-15 Thread Peter Eisentraut
PostgreSQL has schemas, that's the same thing. PostgreSQL's "databases" are not the same thing as MySQL's "databases". -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend

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)-

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] 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] 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

[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

[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

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?

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] 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] 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] 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] 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] [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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

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] 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)-

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

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

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] 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] 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] 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] 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] 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]

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] 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] 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 ---(

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] 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: [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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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

[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

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] '13 months ago'::reltime

2001-05-05 Thread Peter Eisentraut
Christopher Sawtell writes: > On Friday 04 May 2001 06:32, you wrote: > > Type reltime is old and deprecated. Don't use it. > > What should we be using instead? interval -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter

Re: [SQL] Using Transaction Blocks w/ SELECT

2001-04-27 Thread Peter Eisentraut
it. Am > I missing something? Any help appreciated. It's done to get consistent data snapshots across several commands. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- TIP 5: Have you check

Re: [SQL] simulate union in subselect

2001-04-26 Thread Peter Eisentraut
#x27;t actually tried whether this does not work, but ISTM that you could simply do select id, recv_date as date from table1 union select id, send_date as date from table2 order by 2; and ignore the second column when processing the result. -- Peter Eisentraut [EMAIL PROTECTED] http

<    1   2   3   >