Re: [GENERAL] strange sql issue

2006-10-01 Thread Andreas Seltenreich
Thomas Peter writes: the following sql stopped working with postgres, and the fix of this problem seems strange to me. [...] and the fix was, to twist the order in the FROM statement. changing FROM ticket as t, permission as perm, enum as p to FROM permission as perm, enum as p, ticket as

Re: [GENERAL] failure to connect to postgres DB via pg.el

2006-10-07 Thread Andreas Seltenreich
Martin Steffen writes: worked fine for some years, only that when I changed recently to a new linux distribution (from Suse 10 to the latest Fedora core), things broke. [...] - or postgres applies tougher access restrictions on the new linux distribution, and therefore rejects me

Re: [GENERAL] Intentionally produce Errors

2006-10-09 Thread Andreas Seltenreich
Markus Schiltknecht writes: [EMAIL PROTECTED] wrote: In PL/pgSQL you could use the RAISE command: http://www.postgresql.org/docs/8.1/interactive/plpgsql-errors-and-messages.h tml Thank you, good to know. Unfortunately I'm not in a PL/PgSQL function, just a plain query. Some standard

Re: [GENERAL] why not kill -9 postmaster

2006-10-20 Thread Andreas Seltenreich
Harpreet Dhaliwal writes: Its always said that don't kill -9 postmaster. Whats the reason not to do it. Why is it so strictly prohibited? ,[ http://www.postgresql.org/docs/8.1/static/postmaster-shutdown.html#AEN18182 ] | It is best not to use SIGKILL to shut down the server. Doing so

Re: [GENERAL] why not kill -9 postmaster

2006-10-20 Thread Andreas Seltenreich
Ron Johnson writes: On 10/20/06 05:27, Andreas Seltenreich wrote: ,[ http://www.postgresql.org/docs/8.1/static/postmaster-shutdown.html#AEN18182 ] | It is best not to use SIGKILL to shut down the server. Doing so will | prevent the server from releasing shared memory and semaphores

Re: [GENERAL] c function returning high resolution timestamp

2006-10-20 Thread Andreas Seltenreich
Ron Peterson writes: On Wed, Oct 18, 2006 at 04:43:40PM -0400, Ron Peterson wrote: I'm pretty close, but I'm still not understanding something about PostgreSQL's internal timestamp representation. If I do 'select now();', I get a return value with microsecond resolution, which would seem to

Re: [GENERAL] Limits of SQL

2005-06-05 Thread Andreas Seltenreich
Joachim Zobel schrob: Am Samstag, den 04.06.2005, 15:22 -0500 schrieb Bruno Wolff III: On Sat, Jun 04, 2005 at 21:53:24 +0200, Joachim Zobel [EMAIL PROTECTED] wrote: So WITH will allow recursion so I can walk the graph, right? Does this mean I can recursively join until a terminating

Re: [GENERAL] Case insensitive unique constraint

2005-07-14 Thread Andreas Seltenreich
Rob Brenart schrob: I have a simple table to store account names... I want each name to be unique in a case insensitive manner... but I want the case the user enters to be remembered so I can't do a simple lower() on the data's way in. Is there an easy way to go about this? Would creating

Re: [GENERAL] Sorting by related tables

2005-08-13 Thread Andreas Seltenreich
Bill Moseley schrob: create table region { id SERIAL PRIMARY KEY, nametext, -- order this table should be sorted in -- a 1 is the top sort level sort_order integer ); create table city { id SERIAL PRIMARY KEY, nametext, region

Re: [GENERAL] Sorting by related tables

2005-08-15 Thread Andreas Seltenreich
Bill Moseley schrob: On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote: 3) Oh, and I have also this for checking IF there are items in region that are above the item in question -- to see IF an item can or cannot be moved up in the sort order relative to others

Re: [GENERAL] Using gdb to obtain statement

2005-08-24 Thread Andreas Seltenreich
Markus Wollny schrob: 0x40198cd4 in read () from /lib/i686/libc.so.6 (gdb) p debug_query_string $1 = 137763608 What am I doing wrong? You are looking at the string's pointer. You could display it with e.g. printf %s\n, debug_query_string HTH Andreas

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
Zoltán Dudás schrob: I have downloaded an extension for PostgreSql. It contains stored procedures written in C. I compiled the neccessary files into an so file and I tried to use the functions, but it gives an error message when it has to load the shared object file. The error message

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
Tom Lane schrob: Kevin Murphy [EMAIL PROTECTED] writes: Tom Lane wrote: I think he needs to rewrite in C :-(. The backend is not C++ and I fear it's unlikely that libc++ will play nicely as a dynamic add-on. It would be great if some C++/C guru could make a thorough analysis of C++

Re: [GENERAL] STL problem in stored procedures

2005-10-25 Thread Andreas Seltenreich
Tom Lane schrob: Andreas Seltenreich [EMAIL PROTECTED] writes: Tom Lane schrob: It *might* work to put a generic catch/report via elog handler around each one of your entry-point functions. Haven't tried it. Hmm, this setup worked quite stable here for some smaller educational projects

Re: [GENERAL] pgsql info files?

2005-10-29 Thread Andreas Seltenreich
Martijn van Oosterhout schrob: On Sat, Oct 29, 2005 at 08:29:32PM +0100, mike dixon wrote: I really love the info help system (don't know its name; info emacs on cmd line if it's installed calls it up; filenames are texinfo-info* for example); anyone know if info files are available anywhere

Re: [GENERAL] Accessing environment variables from psql (SOLVED)

2005-04-09 Thread Andreas Seltenreich
Leif B. Kristensen writes: So, the problem is solved, sort of. It may also be prudent to save the old pwd and return there when the work is done: leif= \set olddir `echo $PWD` leif= \set importdir `echo $IMPORTDIR` leif= \cd :importdir leif= \i test.sql leif= \cd :olddir You can

Re: [GENERAL] psql error on quitting...

2005-11-09 Thread Andreas Seltenreich
Tom Lane writes: Jerry LeVan [EMAIL PROTECTED] writes: I just upgraded from 8.0.4 to 8.1.0 this afternoon and the only thing bad I have noticed is that whenever I quit psql I get a message: could not save history to file /Users/jerry/.psql_history: Invalid argument This is on MacOS X

Re: [GENERAL] Wrong rows selected with view

2005-11-16 Thread Andreas Seltenreich
Bill Moseley writes: PostgreSQL 7.4.8 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.2 20050816 (prerelease) (Debian 4.0.1-5) Hopefully this is something simple -- I assume it's a problem with my SQL. But it looks really weird to me at this late hour. I have some tables for managing

Re: [GENERAL] Anomalies with the now() function

2005-11-18 Thread Andreas Seltenreich
Byrne Kevin-kbyrne writes: I have a trigger set up on a db - when a row is added to a certain table (say Table A) in my db the trigger calls a function and then the function enters another line in a related table (say Table B). Here's the problem, the first addition to Table A may show the

Re: [GENERAL] simple explain output.

2006-02-20 Thread Andreas Seltenreich
Chris writes: At the moment the explain output can get complicated to parse and process, so I'm trying to think of another approach to use. Any suggestions are welcome :) I think the solution is using debug_print_plan (a guc variable). You can use it to get machine-readable plans in the logs

Re: [GENERAL] \set AUTOCOMMIT off has affect

2006-03-19 Thread Andreas Seltenreich
Axel Straschil writes: I want to disable autocommit, my psqlrc: SET client_min_messages = 'WARNING'; SET add_missing_from = false; \set AUTOCOMMIT off it has no effect: echo show AUTOCOMMIT | psql SET SET autocommit on (1 row) How can I disable autocommit in

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andreas Seltenreich
Andrew M. writes: To answer my own question I included the -l flag: /usr/local/pgsql/bin/postmaster -l -i -D /usr/local/pgsql/data No errors were reported, which I guess there would be if: 1. postgreSQL had not ben built with SSL support? or 2. the certificate has not been properly setup?

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andreas Seltenreich
Andrew M. writes: this what I get when I issue the openssl command: 6521:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:226: could you explain what this means if you know? I'm afraid, I think my suggestion to use openssl's s_client with the postmaster's builtin SSL

Re: [GENERAL] Query generator

2016-10-16 Thread Andreas Seltenreich
Vinicius Segalin writes: > 2016-09-29 16:32 GMT-03:00 Julien Rouhaud : > > > You should try sqlsmith (https://github.com/anse1/sqlsmith), which works > > very well. > > I had found this one before, but all I could get was queries using >