Re: [GENERAL] problem selecting from function

2007-04-06 Thread Michael Fuhr
cting the parameters, not the columns in example1. The query is effectively: for red in select NULL, NULL, NULL from example1 loop The code should work if you qualify the columns: for red in select e.id, e.name1, e.value1 from example1 e loop -- Michael Fuhr ---(end

Re: [GENERAL] YTA Time Zone Question

2007-04-06 Thread Michael Fuhr
----+---- 2007-03-24 21:52:16-07 | 2007-03-24 14:52:16-07 (1 row) The Python driver you're using might behave the same way. I'd suggest contacting driver authors. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] No of triggers of one single table

2007-04-06 Thread Michael Fuhr
On Fri, Apr 06, 2007 at 01:10:13PM -0400, Harpreet Dhaliwal wrote: > Can i have more than one trigger on one single table. Actually I want 2 > different events to take place simultaneously and independently after > insert. What happened when you tried it? -- Mic

Re: [GENERAL] performance; disk bad or something?

2007-04-07 Thread Michael Fuhr
ming bloated again. Is your free space map sufficiently sized? If you do a database-wide VACUUM VERBOSE, what are the last few lines of the output that mention free space map settings? -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below

Re: [GENERAL] performance; disk bad or something?

2007-04-07 Thread Michael Fuhr
On Sat, Apr 07, 2007 at 01:49:38PM +0200, Marcus Engene wrote: > Michael Fuhr skrev: > >How often does this table receive updates and deletes and how often > >are you vacuuming it? > > If I should take a guess, there are 5 deletes per day and 5 updates or > inserts per

Re: [GENERAL] Do I need serializable for this query?

2007-04-11 Thread Michael Fuhr
e id = 1; T2: update test set t = 'c' where id = 1; -- blocks T1: commit; T2: ERROR: could not serialize access due to concurrent update -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an ap

Re: [GENERAL] pg_dump seg fault on sequences

2007-04-14 Thread Michael Fuhr
->owning_col - 1])); (gdb) p owning_tab->attnames $1 = (char **) 0x0 -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] FIN_WAIT_2

2007-04-27 Thread Michael Fuhr
in FIN_WAIT_2, any > suggest? Which side of the connection is in FIN_WAIT_2? What's the netstat output for both sides? What can you tell us about how this application works? -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] IP Address Validation

2007-05-09 Thread Michael Fuhr
#x27;junk'); ERROR: 22P02: invalid input syntax for type inet: "junk" http://www.postgresql.org/docs/8.2/interactive/errcodes-appendix.html 22P02 INVALID TEXT REPRESENTATION invalid_text_representation -- Michael Fuhr ---(end of broadcast)--

Re: [GENERAL] autovacuum

2007-05-13 Thread Michael Fuhr
ages because they're logged at DEBUG1 and you have log_min_messages at a level that doesn't show debug messages. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-n

Re: [GENERAL] Printing values on pgadmin tool window using plperlu

2007-05-13 Thread Michael Fuhr
x27; tab to pgadmin query tool window. > How and where can I print these values while running the plperlu function. Use elog(). http://www.postgresql.org/docs/8.2/interactive/plperl-database.html -- Michael Fuhr ---(end of broadcast)--- TIP 3: H

Re: [GENERAL] change database encoding without corrupting data (latin9 to utf8)

2007-05-19 Thread Michael Fuhr
have a mix of uncorrupted and corrupted characters (UTF8 byte sequences stored as LATIN9) then you have a bit of a problem because some data needs to be converted from LATIN9 to UTF8 but other data is already UTF8 and shouldn't be converted. -- Michael Fuhr ---(

Re: [GENERAL] flattened tables with normalized tables

2004-10-07 Thread Michael Fuhr
m/varlena/GeneralBits/Tidbits/matviews.html Before deciding on a solution, be sure you fully understand the problem you're trying to solve. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading thro

Re: [GENERAL] flattened tables with normalized tables

2004-10-07 Thread Michael Fuhr
ing them as an alternative to your "flattened table" if part of its purpose would be to simplify queries. You might want to perform some experiments to see if the performance gains from a materialized view are worth the extra complexity. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] Question from a newbie

2004-10-07 Thread Michael Fuhr
(); test4 (1 row) The code should look more like this: result = plpy.execute("select getcountrycode(\'9821788\')",1) return result[0]["getcountrycode"] -- Michael Fuhr http://

Re: [GENERAL] CGI program cannot access database

2004-10-08 Thread Michael Fuhr
mple and not the real domain name. Samik, what's the real name? Should it be resolvable from the public Internet? The original message reported the following error when connecting by IP address: failed: could not create socket: Operation not permitted I wonder of packet filters are preventing t

Re: [GENERAL] CGI program cannot access database

2004-10-08 Thread Michael Fuhr
On Fri, Oct 08, 2004 at 11:35:34AM -0500, Samik Raychaudhuri wrote: > On 10/8/2004 11:05 AM, Michael Fuhr wrote: > > > >failed: could not create socket: Operation not permitted > > > >I wonder of packet filters are preventing the PostgreSQL connection > >from

Re: [GENERAL] foreign key constraints, cannot delete

2004-10-08 Thread Michael Fuhr
s this the *exact* error message, cut-and-pasted? What do your table definitions look like? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-no

Re: [GENERAL] Linking question

2004-10-23 Thread Michael Fuhr
link(...)"? It would be easy to handle such a query with the Server Programming Interface (SPI): http://www.postgresql.org/docs/7.4/static/spi.html If you don't use SPI then you're probably going to have to duplicate some of the magic it performs. This seems needless, esp

Re: [GENERAL] list fieldnames in table? (from PHP)

2004-10-25 Thread Michael Fuhr
x27;ll see the hidden queries that psql sends for "\d tablename", etc. Examine those queries and use the relevant parts in your own code. You might want to familiarize yourself with the system catalogs, which is what you'll be querying: http://www.postgresql.org/docs/7.4/static/cata

Re: [GENERAL] Error restoring bytea from dump

2004-10-26 Thread Michael Fuhr
ou mentioned but might be what you meant. > (There are double apostophes [''] many times in the string - is it normal??? > Besides of the field separator [','] of course...) http://www.postgresql.org/docs/7.4/static/sql-syntax.html#SQL-SYNTAX-STRINGS http://www.postgres

Re: [GENERAL] Array values and foreign keys

2004-10-27 Thread Michael Fuhr
ke comparing the > length of the array to SELECT count(1) FROM T2 WHERE key IN array This provides only partial foreign key checking: depending on how the application works, you might also need to ensure that updates and deletes in T2 don't break the references in T1. -- Michael Fuhr

Re: [GENERAL] Reasoning behind process instead of thread based arch?

2004-10-27 Thread Michael Fuhr
process if somebody could figure out a way to distribute a query amongst the threads. I don't know what the PostgreSQL developers' thoughts on that are. A disadvantage of threads is that some systems (e.g., FreeBSD 4) implement threads in userland and threads don't take advantage o

Re: [GENERAL] interval to seconds conversion. How?

2004-10-27 Thread Michael Fuhr
act(epoch FROM '5 hours 42 minutes 35 seconds'::INTERVAL); date_part ------- 20555 -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] determine sequence name for a serial

2004-10-27 Thread Michael Fuhr
N s2.oid = t2.relnamespace JOIN pg_attribute AS a ON a.attrelid = d.refobjid AND a.attnum = d.refobjsubid WHERE t1.relkind = 'r' AND t2.relkind = 'S'; I posted a somewhat different query in a recent thread about automatically updating all sequences after importing data: http:

Re: [GENERAL] field incrementing in a PL/pgSQL trigger

2004-10-28 Thread Michael Fuhr
stgresql.org/pgsql-general/2004-10/msg01112.php -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(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: [GENERAL] Turning a subselect into an array

2004-10-28 Thread Michael Fuhr
INTO table_a SELECT a, b, ARRAY(SELECT c FROM table_c WHERE table_c.parent = table_b.id) FROM table_b -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] determine sequence name for a serial

2004-10-28 Thread Michael Fuhr
seq", but rather "oldtablename_oldcolumnname_seq". -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Turning a subselect into an array

2004-10-29 Thread Michael Fuhr
s.html If I understand you correctly, this should work: SELECT ARRAY(SELECT name FROM foo WHERE id = ANY(ARRAY[1,2,3])); A test I just ran showed "id = ANY(ARRAY[1,2,3])" doing a sequential scan whereas "id IN (1,2,3)" did an index scan, so you might want to use the latter

Re: [GENERAL] procedural languages in 7.4.6

2004-10-31 Thread Michael Fuhr
from a prebuilt package? Plperl is in the 7.4.6 source code. If you're downloading the split-up tarballs, then it's in postgresql-opt, just as it was in 7.4.5. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have

Re: [GENERAL] View's rule on delete problem

2004-10-31 Thread Michael Fuhr
en the rule for foobar only needs to delete from foo explicitly, and the additional delete from bar is done implicitly by the foreign key trigger." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] logging queries and time used

2004-11-01 Thread Michael Fuhr
ou might be able to feed the logging output to a script that inserts into a table, but make sure that important log messages are also stored outside the database to avoid losing them if trouble arises. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] unique problem

2004-11-01 Thread Michael Fuhr
-unique rows (again > nothing found). Did you sort the file before you ran uniq? Duplicate lines need to be adjacent for uniq to recognize them. % cat foo abc def abc % uniq -d foo % sort foo | uniq -d abc -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broad

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Michael Fuhr
AS ' DECLARE addr TEXT[] := ''{}''; BEGIN IF $1 IS NOT NULL THEN addr := array_append(addr, $1); END IF; IF $2 IS NOT NULL THEN addr := array_append(addr, $2); END IF; IF $3 IS NOT NULL THEN addr := array_append(addr, $

Re: [GENERAL] Trigger Parameter problem

2004-11-05 Thread Michael Fuhr
tatic/plpgsql-trigger.html http://www.postgresql.org/docs/7.4/static/sql-createtrigger.html If I've misunderstood what you're asking then please clarify. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Hav

Re: [GENERAL] Retrieve ip client from postgres

2004-11-05 Thread Michael Fuhr
I don't think you could get this info in earlier versions, although I recall seeing an user-defined function that somebody had written. Use a search engine and see if anything comes up. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--

Re: [GENERAL] INTERVAL in a function

2004-11-08 Thread Michael Fuhr
27;t need to check for NULL because the result of the addition will already be NULL if either operand is NULL. Casting CURRENT_TIMESTAMP is necessary to avoid a "return type mismatch" error. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Newbie Question, how to grant permissions on all tables in schema/db

2004-11-08 Thread Michael Fuhr
sually suggest writing a script or function to query the system catalogs for the list of tables, views, sequences, etc. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Functions in postgres

2004-11-09 Thread Michael Fuhr
hide sensitive data embedded in the code? If the latter, then you might be able to move the data to a table and create the function with SECURITY DEFINER. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to

Re: [GENERAL] new data types

2004-11-09 Thread Michael Fuhr
der what circumstances should this happen? What are you trying to do? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Modifying FK constraints

2004-11-10 Thread Michael Fuhr
ints with ALTER TABLE. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Can't insert date in field with foreign key

2004-11-11 Thread Michael Fuhr
- > 23555 | 10001 | Aff?ller | SRID=31467;POINT(3483856.148 5632168.48) > (1 Zeile) The foreign key constraint on T_OEPNV_HST_LIN.HST_NR references the wrong field in T_OEPNV_HST. Since you didn't specify a field, it's referencing the primary key HST_ID instead of HST_NR. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] simple query question: return latest

2004-11-11 Thread Michael Fuhr
st recent entry for all colors then you could use SELECT DISTINCT ON: SELECT DISTINCT ON (color) * FROM colortable ORDER BY color, date DESC; In either case, if multiple records have the same date and the ORDER BY clause isn't specific enough to guarantee a certain order, then it&#x

Re: [GENERAL] simple query question: return latest

2004-11-12 Thread Michael Fuhr
more accurate results by being more explicit. Scott, how would a subquery "ensure more accurate results by being more explicit"? > If 2 days are equal for color red, you still would get 2 rows returned. How do you figure, given the presence of LIMIT 1? -- Mi

Re: [GENERAL] sub-query question

2004-11-12 Thread Michael Fuhr
On Fri, Nov 12, 2004 at 09:52:09AM -0800, Scott Frankel wrote: > > How does one embed a sub-query lookup to one table in order to > replace a foreign key id number with it's name in a SELECT on a > second table? You're talking about joins. http://www.postgresql.org/docs/7.4/static/tutorial-join.

Re: [GENERAL] sub-query question

2004-11-12 Thread Michael Fuhr
On Fri, Nov 12, 2004 at 11:26:14AM -0700, Michael Fuhr wrote: > There are at least four ways to write the join query you want: I may have misunderstood what results you're looking for, but the examples I gave may nevertheless be useful. Sorry if they cause any confusion. -- Michael F

Re: [GENERAL] Problem with showing time diff?

2004-11-12 Thread Michael Fuhr
iff > is less than 0, it shows as 00:-9 and not -00:09 The documentation deprecates to_char(interval, text) and the Release Notes for 8.0 say that 8.1 will remove it. You might be able to use substring(): SELECT substring('-00:09:10'::interval from '(.*):[0-9][0-9]$'); s

Re: [GENERAL] Value of serial data type after insert.

2004-11-13 Thread Michael Fuhr
hat because this is returning a session-local value, it gives a predictable answer even if other sessions are executing nextval meanwhile." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searc

Re: [GENERAL] Large database

2004-11-13 Thread Michael Fuhr
Please post the EXPLAIN ANALYZE output for the query as well so we can see what the planner is doing. Have you tuned any settings in postgresql.conf? The following page has some tuning tips: http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html -- Michael Fuhr http://www.fuhr.org/~mfuh

Re: [GENERAL] table configuration tweak for performance gain.

2004-11-14 Thread Michael Fuhr
ry and the EXPLAIN ANALYZE output? We could probably give better advice if we could see what's happening. Have you experimented with lowering random_page_cost? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP

Re: [GENERAL] table configuration tweak for performance gain.

2004-11-15 Thread Michael Fuhr
d now() - interval '5 minutes'\g > value > --- > (0 rows) "a BETWEEN x AND y" is equivalent to "a >= x AND a <= y", so if x and y aren't chosen correctly then the expression will always evaluate to false: SELECT 5 B

Re: [GENERAL] question about temp table in function

2004-11-16 Thread Michael Fuhr
; line 2 at SQL statement LOCATION: DropErrorMsgNonExistent, utility.c:144 The error code is 42P01, which Appendix A shows as UNDEFINED TABLE. The exception-handling block would therefore be: BEGIN DROP TABLE my_temp; EXCEPTION WHEN undefined_table THEN NULL; EN

Re: [GENERAL] ERROR: column "id" does not exist

2004-11-16 Thread Michael Fuhr
are > also entries in it. The column might have a different case or possibly leading or trailing spaces, in which case you'll have to quote it verbatim. What does \d apconfig show? If that doesn't show the problem then try this: SELECT quote_ident(attname) FROM pg_attribute WHERE a

Re: [GENERAL] How to suppress echo while executing batch files?

2004-11-16 Thread Michael Fuhr
ng the \i switch, I get the echo > INSERT 0 1 > > for every single insert statement of my batch file. > > Since I assume that this slows down the whole process I would like to know > if there is a way to suppress that echo and only get error messages and > such? \se

Re: [GENERAL] table configuration tweak for performance gain.

2004-11-16 Thread Michael Fuhr
s does pointname have? Have you considered adding an index on pointname or a multicolumn index on pointname and dt? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index sca

Re: [GENERAL] Knowing when a row was last updated

2004-11-17 Thread Michael Fuhr
On Wed, Nov 17, 2004 at 07:43:31PM +0530, Antony Paul wrote: > Is it possible to know when a row was last updated. Using 7.3.3. Add a TIMESTAMP or TIMESTAMP WITH TIME ZONE column to the table and use a trigger to update it. -- Michael Fuhr http://www.fuhr.org/~mf

Re: [GENERAL] Rules WHERE condition

2004-11-17 Thread Michael Fuhr
See the CREATE RULE documentation: http://www.postgresql.org/docs/7.4/static/sql-createrule.html In particular, read the last paragraph of the Description section, the one that begins, "There is a catch if you try to use conditional rules for view updates" -- Michael Fuhr http://

Re: [GENERAL] Problem Downloading for FreeBSD

2004-11-20 Thread Michael Fuhr
Are your connections going through a proxy or some other device that might be interfering with your downloads? Have you tried other download programs like wget, curl, or (nc)ftp? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] Join between databases or (???)

2004-11-20 Thread Michael Fuhr
t not provide all the functionality you're looking for. Could the multiple databases possibly be converted into multiple schemas in the same database? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Join between databases or (???)

2004-11-20 Thread Michael Fuhr
ostgreSQL doesn't have any inherent cross-database capabilities. You can use dblink to query another database and join the results against the current database, but its capabilities probably aren't what you'd consider "full-featured." Still, you might want to check i

Re: [GENERAL] Join between databases or (???)

2004-11-21 Thread Michael Fuhr
execute > "nextval" against that very schema Any idea what might be going > wrong here?... I think you mean that you can execute nextval() against the sequence, not the schema. Anyway, it looks like whatever created the dump file incorrectly added double quotes around

Re: [GENERAL] timestamp with time zone question...

2004-11-21 Thread Michael Fuhr
ocumentation. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(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: [GENERAL] COMMIT within function?

2004-11-21 Thread Michael Fuhr
N NULL; END; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] How to list databases with SQL statement?

2004-11-22 Thread Michael Fuhr
aneous Functions documentation for the difference: http://www.postgresql.org/docs/7.4/static/functions-misc.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan i

Re: [GENERAL] Will B4->B5 require an Initdb?

2004-11-23 Thread Michael Fuhr
atalog version number for beta4. Therefore, you'll need to run initdb. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Lexical question...

2004-11-23 Thread Michael Fuhr
On Tue, Nov 23, 2004 at 09:03:26AM -0500, John DeSoi wrote: > select now() - ((round(random()*45))::text || ' days')::interval; Or one of the following (add round() if desired): select now() - 45 * random() * interval'1 day'; select now() - random() * interval'45

Re: [GENERAL] Nesting Stored Procedure Calls

2004-11-24 Thread Michael Fuhr
ing trouble then it would be helpful to see what you're doing, what you'd like to happen, and what actually does happen. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the

Re: [GENERAL] Can one alter the format of a numeric column?

2004-11-27 Thread Michael Fuhr
s versions see the FAQ: http://www.postgresql.org/docs/faqs/FAQ.html#4.4 -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] SERIAL error

2004-11-27 Thread Michael Fuhr
ndering if this needed to be reported as a bug? Seems > to cause problems for certain generic uses for the serial type. What do you mean by "generic uses"? Sequences are for obtaining unique values; problems caused by assuming anything else are almost certainly application bugs. --

Re: [GENERAL] How many views...

2004-11-28 Thread Michael Fuhr
7;s no need to calculate and check the distances to them. If you have indexes on latitude and longitude then the search should be fast. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] How many views...

2004-11-29 Thread Michael Fuhr
exes on latitude and longitude (or a multicolumn index on both latitude and longitude), this query should be reasonably fast. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] SQL Server stored procedures?

2004-11-29 Thread Michael Fuhr
either. The function could return SETOF RECORD, but then queries that use it will have to supply their own column definitions. I prefer to do this only when the return rows don't have a fixed format. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end o

Re: [GENERAL] increase the column size

2004-11-29 Thread Michael Fuhr
'll be able to use ALTER TABLE. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] Postgres Design

2004-11-30 Thread Michael Fuhr
hout knowing more about your data it's hard to recommend a good way to organize it. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(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

[GENERAL] List archives not being updated?

2004-12-02 Thread Michael Fuhr
The list archives at http://archives.postgresql.org/ don't appear to have been updated since Tue 30 Nov. Is something amiss? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, p

Re: [GENERAL] Indexes?

2004-12-02 Thread Michael Fuhr
d try it both ways and use EXPLAIN ANALYZE to see which results in a faster plan, if that's what you mean by "best." -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched ou

Re: [GENERAL] relation does not exist error

2004-12-02 Thread Michael Fuhr
select * from Customers; > ERROR: relation "customers" does not exist See the "Identifiers and Key Words" section in the "SQL Syntax" of the PostgreSQL documentation. Pay particular attention to what it says about case sensitivity, case folding, and quoting of

Re: [GENERAL] psql connection timeout

2004-12-02 Thread Michael Fuhr
TIMEOUT=5 psql -h bogushost If you always want to use a particular timeout then set the environment variable in your shell's startup script. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our

Re: [GENERAL] PostgreSQL 8.0.0 Release Candidate 1

2004-12-03 Thread Michael Fuhr
lf be a typo, is: ftp://ftp.postgresql.org/pub/source/v8.0.0beta/ChangeLog-Beta5-RC1 -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

[GENERAL] List archives search function broken

2004-12-04 Thread Michael Fuhr
Using the list archive search function currently fails with 503 Service Unavailable. Should messages about list archive problems go to pgsql-general, or would it be better to use one of the other lists like bugs, hackers, or www? -- Michael Fuhr http://www.fuhr.org/~mfuhr

Re: [GENERAL] Trigger problem

2004-12-04 Thread Michael Fuhr
or a particular row, but for the entire statement, which could affect multiple rows. Also, your trigger function doesn't return a value. Even though AFTER triggers ignore the return value, the function must still return something. The documentation recommends returning NULL when the value will be

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
nection instead of a local (Unix-domain) connection. You can use psql's -h option or the PGHOST environment variable to force a TCP connection (e.g., psql -h localhost). See also the hostssl and hostnossl connection types in pg_hba.conf. -- Michael Fuhr http://www.fuhr.o

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
hapter in the documentation, in particular the "SSL Session Encryption" section: http://www.postgresql.org/docs/7.4/static/protocol-flow.html#AEN52782 You can use psql to check if SSL is working. Psql prints a message like the following if SSL was successfully negotiated: SSL connect

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
e PostgreSQL documentation. Look for the variables to configure logging. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 11:02:33AM -0800, Steve Atkins wrote: > On Sun, Dec 05, 2004 at 11:27:57AM -0700, Michael Fuhr wrote: > > > > You can use psql to check if SSL is working. Psql prints a message > > like the following if SSL was successfully negotiated: > > >

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 12:27:33PM -0700, Michael Fuhr wrote: > On the client side you could set the PGSSLMODE environment variable > to "require" (or the older PGREQUIRESSL to "1"), which should tell > libpq to attempt only SSL connections. I forgot to mention tha

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
quot;, then setting environment variables might still work. See the "Environment Variables" section of the "libpq - C Library" chapter in the PostgreSQL documentation. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
ould that do the trick? Sorry for so many questions.. i have a lot to > learn about postgreSQL ;-) I don't know if that would work or not -- I'm not familiar with the interface you're using. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
ostgresql.org/docs/ Even if you're using an interface that abstracts libpq and you're not calling its functions directly, it's useful to know how the underlying library works. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] Function Problem

2004-12-05 Thread Michael Fuhr
t discussion in the list archives. http://www.postgresql.org/docs/faqs/FAQ.html http://archives.postgresql.org/ -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-05 Thread Michael Fuhr
file or directory PgSPI.h:17:21: funcapi.h: No such file or directory PgSPI.h:18:26: executor/spi.h: No such file or directory 2. Remove or comment out #include "ppport.h" from PgSPI.h. Neither of my systems have this file and the module builds without it. -- Michael Fuhr

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-05 Thread Michael Fuhr
On Mon, Dec 06, 2004 at 01:38:27AM -0500, [EMAIL PROTECTED] wrote: > On Sun, 5 Dec 2004, Michael Fuhr wrote: > > > Using PostgreSQL 8.0.0rc1 and Perl 5.8.6 on FreeBSD 4.10-STABLE and > > Solaris 9, I had to make a couple of changes to get DBD::PgSPI to > > build: > >

Re: [GENERAL] Detecting Temporary Tables

2004-12-06 Thread Michael Fuhr
he PostgreSQL documentation for information on finding a table's schema. If you're using 7.4 or later then see also the "Information Schema" chapter -- one of its views has two fields that should be helpful. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] More problems

2004-12-06 Thread Michael Fuhr
ll return? That depends on what language you're using and how you're making the query. Please provide more details about what you're trying to do. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you c

Re: [GENERAL] Triggers don't activate when dropping table

2004-12-06 Thread Michael Fuhr
which makes the system unstable. If you want to fire the triggers then delete all records from the table before dropping it. But why are you dropping the table? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the plan

Re: [GENERAL] Rules

2004-12-06 Thread Michael Fuhr
t; problems getting this to work? Any ideas anyone? I'm not sure I follow. Could you post examples of what you've tried, describe what you want to happen, and tell us what actually did happen? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] Drop table

2004-12-07 Thread Michael Fuhr
a lock on the table. Have you looked at pg_locks? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Triggers don't activate when dropping table

2004-12-07 Thread Michael Fuhr
stem throws error message.ERROR: could not open relation > with OID 1390714. What's happening when you get this error? If you've been dropping tables then you might have a problem with cached plans. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)-

Re: [GENERAL] How to get rid of notices for create table?

2004-12-10 Thread Michael Fuhr
that you didn't explicitly request. > 2 - How can I get rid of them? See the "Error Reporting and Logging" section of the "Server Run-time Environment" chapter in the documentation. You can configure what message levels go to the server logs and to the client. -- Michael

Re: [GENERAL] Natural ordering in postgresql? Does it exist?

2004-12-10 Thread Michael Fuhr
ER; SELECT ... ORDER BY SUBSTRING(fieldname FROM '^(\\w+)'), SUBSTRING(fieldname FROM '(\\d+)')::INTEGER; -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

<    2   3   4   5   6   7   8   9   10   11   >