Re: [GENERAL] Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9

2007-05-27 Thread Michael Fuhr
a value of type anyelement I think this has already been fixed in CVS: http://archives.postgresql.org/pgsql-hackers/2007-05/msg00014.php http://archives.postgresql.org/pgsql-committers/2007-05/msg00011.php -- Michael Fuhr ---(end of broadcast)--- TIP

Re: [GENERAL] Different sort order

2007-05-28 Thread Michael Fuhr
On Mon, May 28, 2007 at 07:07:41PM +0200, Poul Møller Hansen wrote: > I'm wondering why the sort order on these two servers behaves differently. What's the output of the following query on each server? select name, setting from pg_settings where name ~ '^lc_&#

Re: [GENERAL] Possible DB corruption

2007-05-28 Thread Michael Fuhr
nce every billion transactions." -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Possible DB corruption

2007-05-28 Thread Michael Fuhr
On Mon, May 28, 2007 at 04:14:14PM -0600, Michael Fuhr wrote: > On Fri, May 25, 2007 at 04:47:52PM -0400, Justin M Wozniak wrote: > > We noticed that some records were mysteriously disappearing from > > our DB. I went in with psql and found that the \dt command no longer >

Re: [GENERAL] function retuning refcursor, order by ignored?

2007-05-29 Thread Michael Fuhr
quot;"; item_id | item_name | item_org_id | item_active -+---+-+- 1 | one | 1 | t 2 | two | 1 | t 3 | three | 1 | t 4 | four | 1 | t (4 rows) COMMIT; -

Re: [GENERAL] what to do when pg_cancel_backend() doesnt work?

2007-06-04 Thread Michael Fuhr
be stuck. http://postgis.refractions.net/docs/ch06.html#id2527029 http://geos.refractions.net/ -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column

Re: [GENERAL] Foreign keys and indexes

2007-06-05 Thread Michael Fuhr
'll need to create it yourself. -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] COPY error

2007-06-05 Thread Michael Fuhr
,0.134339,3.99197,2.22381,-0.435095,6.9} \. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get th

Re: [GENERAL] setting login database

2007-06-07 Thread Michael Fuhr
p://www.postgresql.org/docs/8.2/interactive/libpq-pgservice.html -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] list all columns in db

2007-06-07 Thread Michael Fuhr
lse you might get something like table_schema | table_name | column_name --++-- public | foo| pg.dropped.2 public | foo| col1 public | foo| col3 (3 rows) -- Michael Fuhr

Re: [GENERAL] setting login database

2007-06-08 Thread Michael Fuhr
authorization failure coming from the database? What do the database logs show? Are you sure you're using the correct username and password? What do you have in pg_hba.conf? -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to

Re: [GENERAL] pg_hba.conf - md5

2007-06-09 Thread Michael Fuhr
esql.org/docs/8.2/interactive/ssl-tcp.html The server could optionally require the client to present a certificate signed by a specific CA and the client could require the same of the server; see the discussion of root.crt for more information. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Functions that return both Output Parameters and recordsets

2007-06-11 Thread Michael Fuhr
documentation for an example (the example is at the bottom of the page). http://www.postgresql.org/docs/8.2/interactive/plpgsql-cursors.html -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] precision of epoch

2007-06-14 Thread Michael Fuhr
94 (1 row) You could convert the epoch value to numeric but you'll have to use a more complex expression; simply casting EXTRACT's result to numeric won't work. One possibility might involve floor and to_char(value, '.US'). -- Michael Fuhr ---(en

Re: [GENERAL] Which meta table contain the functions

2007-06-16 Thread Michael Fuhr
uns by starting psql with the -E (--echo-hidden) option or by executing "\set ECHO_HIDDEN". This is a helpful way to learn about the system catalogs. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-17 Thread Michael Fuhr
M ANALYZE manually but for many databases autovacuum is a good way to maintain statistics and clean up dead rows automatically. -- Michael Fuhr ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-no

Re: [GENERAL] Normal distribution et al.?

2007-06-17 Thread Michael Fuhr
For this particular example see also normal_rand() in contrib/tablefunc. -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Trigger function that works with both updates and deletes?

2007-06-18 Thread Michael Fuhr
http://www.postgresql.org/docs/8.2/interactive/plpgsql-trigger.html -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] alter table type from double precision to real

2007-06-24 Thread Michael Fuhr
houldn't be necessary. > But PostgreSQL's data disk usage did not shrinked. > And pg_dump size remained same. > It seems that real takes 8 byte storage sizes. Real is 4 bytes but other columns' alignment requirements might result in no space being saved. -- Michael Fuhr

Re: [GENERAL] alter table type from double precision to real

2007-06-24 Thread Michael Fuhr
On Mon, Jun 25, 2007 at 12:35:11AM -0400, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > On Mon, Jun 25, 2007 at 09:51:30AM +0900, [EMAIL PROTECTED] wrote: > >> It seems that real takes 8 byte storage sizes. > > > Real is 4 bytes but other colu

Re: [GENERAL] alter table type from double precision to real

2007-06-25 Thread Michael Fuhr
On Mon, Jun 25, 2007 at 12:35:11AM -0400, Tom Lane wrote: > As for that pg_dump measurement, the text form isn't going to get > smaller ... "1.2" is the same length as "1.2". Non-text formats like -Fc should (or might) shrink, right? They appear to in the tes

Re: [GENERAL] LC_CTYPE and matching accented chars

2007-06-27 Thread Michael Fuhr
ize text to NFD (Unicode Normalization Form D) and remove nonspacing marks. Here's a message with a couple of PL/Perl functions: http://archives.postgresql.org/pgsql-general/2007-01/msg00702.php -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Michael Fuhr
s? > Is it possible to catch errors generated pl/perl functions in a BEGIN ... > EXCEPTION WHEN ... END block? Or perhaps in some other way? You could use "WHEN internal_error" or "WHEN others". If that doesn't work then please post a simple but complete example that sh

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Michael Fuhr
n't see any relevant TODO items. Would something like the following be appropriate? * Allow RAISE and its analogues to set SQLSTATE. -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Michael Fuhr
boot so it might have been due to a power outage. Has anybody figured out if this is a Linux kernel bug? I might have until Monday morning if anybody can suggest something to look at; after that the admins will probably reboot and/or remove postmaster.pid to get the database running aga

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Michael Fuhr
On Sun, Jul 01, 2007 at 10:06:58PM -0400, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > Has anybody figured out if this is a Linux kernel bug? I might > > have until Monday morning if anybody can suggest something to look > > at; after that the admins

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-02 Thread Michael Fuhr
already tried those; none show the shared memory key that the postmaster is complaining about. -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining

Re: [GENERAL] tables are not listable by \dt

2007-07-02 Thread Michael Fuhr
t; No relations found > > But when I do > > SELECT relname, relpages FROM pg_class ORDER BY relpages DESC; > > I get a list of the tables and their sizes. Are the tables in schemas that are in your search_path? -- Michael Fuhr ---(end of broadcast)---

Re: [GENERAL] Vacuum issue

2007-07-05 Thread Michael Fuhr
put to be sure). Is that where your tables are? > I am running Postgre 8.4 on a Susse 10.1 PostgreSQL (not "Postgre") 8.4 doesn't exist; do you mean 8.2.4? -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Localization trouble

2007-07-05 Thread Michael Fuhr
1,234 (1 row) The file src/backend/utils/adt/pg_locale.c in the PostgreSQL source code has comments about how various LC_* settings are used in the backend. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] unconvertable characters

2007-07-16 Thread Michael Fuhr
er possibility would be to use a command like iconv to convert the data to UTF-8 and strip unconvertible characters; on many systems you could do that with "iconv -f iso8859-8 -t utf-8 -c". If you convert to UTF-8 then you'd need to change client_encoding accordingly. -- Michael F

Re: [GENERAL] average/stddev on all values returned by a select distinct

2007-07-17 Thread Michael Fuhr
; I think this is what you're looking for: select avg(length) from ( select distinct on (id) length(consensus) from cluster order by id, length(consensus) desc ) s; -- Michael Fuhr ---(end of broadcast)--- TIP 4: Have y

Re: [GENERAL] Foreign key constraint question

2007-07-20 Thread Michael Fuhr
INITIALLY DEFERRED > > I could add a column to companies that is always set to "Company" but > that seems like a waste. I tried the above and I got a syntax error. What purpose is the constraint intended to achieve? -- Michael Fuhr ---(end

Re: [GENERAL] encodings

2007-07-21 Thread Michael Fuhr
hange in the process? > In other words, does encoding influence only data stored in tables, or > it influences database structure as well? I can't think of how the encoding would influence the structure. Are you seeing behavior that suggests otherwise? -- Michael Fuhr ---

Re: [GENERAL] posgres tunning

2007-07-21 Thread Michael Fuhr
dations. For configuration guidelines see the performance-related documents at Power PostgreSQL: http://www.powerpostgresql.com/Docs -- Michael Fuhr ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] shp2pgsql Help with sintax!

2007-07-22 Thread Michael Fuhr
to set the SRID, and you can use the -g option to specify a geometry column name other than the default of "the_geom". If this doesn't help then please post the commands you're running and explain how the results differ from what you'd like. If you're getting errors t

Re: [GENERAL] Slow query but can't see whats wrong

2007-07-24 Thread Michael Fuhr
e a pg_dump. Fixing this has been discussed a few times but I don't think anybody has worked on it. The developers' TODO list has the following item: * Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index sta

Re: [GENERAL] regexp_replace

2007-07-24 Thread Michael Fuhr
re information search for regexp_replace in the Pattern Matching section of the Functions and Operators chapter of the documentation. http://www.postgresql.org/docs/8.2/interactive/functions-matching.html -- Michael Fuhr ---(end of broadcast)--- T

Re: [GENERAL] Backslah in encrypt function.

2007-07-25 Thread Michael Fuhr
1 (1 row) test=> select encode(decrypt(encrypt(e'', 'abcd', 'bf'), 'abcd', 'bf'), 'hex'); encode ---- 5c (1 row) Depending on your security requirements you might wish to use pgp_sym_encrypt() or pgp_sym_encrypt_bytea()

Re: [GENERAL] Require entry of MD5 hash instead of plaintext password?

2007-07-28 Thread Michael Fuhr
On Fri, Jul 27, 2007 at 09:33:37AM -0700, [EMAIL PROTECTED] wrote: > Is there a way to configure PostgreSQL 8.0 so that when prompted for a > password, the user enters the MD5 hash of his password, instead of the > normal plaintext password? What problem are you trying to solve? -- Mic

Re: [GENERAL] pg_dump

2007-07-30 Thread Michael Fuhr
just as any other libpq application can. Are you sure your pg_dump is linked against an SSL-enabled libpq? Have you tried setting the PGSSLMODE environment variable? What version of PostgreSQL are you running? -- Michael Fuhr ---(end of broadcast)

Re: index bloat WAS: [GENERAL] reindexing pg_shdepend

2007-08-03 Thread Michael Fuhr
end because no released version of PostgreSQL has the fix for the statistics bug (it has been fixed in CVS, however). As I mention in the second message above, vacuuming pg_shdepend resulted in an immediate performance improvement in an application I was investigating. -- Michael Fuhr -

Re: [GENERAL] Selecting rows where timestamp between two timestamps

2007-08-13 Thread Michael Fuhr
t I know there are at least 100 rows that should be > returned... Put the lower value first or use BETWEEN SYMMETRIC: select * from foobar where ts between now() - interval '5 days' and now() select * from foobar where ts between symmetric now() and now() - interval '5 days'

Re: [GENERAL] strange TIME behaviour

2007-09-15 Thread Michael Fuhr
-- > 60030.824587 > (1 row) By casting current_time to time without time zone you're now getting the number of seconds since 00:00:00 in your local time zone. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] [Urgent] Regexp_replace question

2007-09-24 Thread Michael Fuhr
, t, regexp_replace(t, e'[[\\]+]', '', 'g') from foo; id | t | regexp_replace ++ 1 | foo[]+\bar | foobar (1 row) test=> select id, t, translate(t, e'[]\\+', '') from foo; id | t | translate

Re: [GENERAL] UNIQUE_VIOLATION exception, finding out which index would have been violated

2007-09-25 Thread Michael Fuhr
would have been violated? In PL/pgSQL you could extract the constraint name from SQLERRM, which should be a string like 'duplicate key violates unique constraint "foo_id1_key"'. -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Please change default characterset for database cluster

2007-09-28 Thread Michael Fuhr
cking it up from your environment. http://www.postgresql.org/docs/8.2/interactive/app-initdb.html "The default is derived from the locale, or SQL_ASCII if that does not work." -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] looking for some real world performance numbers

2007-10-22 Thread Michael Fuhr
, however: transaction rates are low (a few hundred per minute) and most logic is in database functions with statements that operate on hundreds or thousands of rows at a time. Still, this gives an idea of what a PostgreSQL database on decent hardware can handle. -- Michael Fuhr -

Re: [GENERAL] looking for some real world performance numbers

2007-10-22 Thread Michael Fuhr
n't know the full specs because another group is responsible for that. I think the box has four Athlon 64 X2s with 32G RAM. At least some of the storage is SAN-attached. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Analyze Explanation

2008-01-29 Thread Michael Fuhr
metry_stats() logs such a message. I'd guess you're using PostGIS and those tables have NULL in all rows' geometry columns. -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Change column type to numeric

2008-02-10 Thread Michael Fuhr
lank value as numeric and > failing. Does anyone know of an easy way to work around this? You could convert the empty strings to NULL: USING cast(nullif(amount, '') AS numeric) -- Michael Fuhr ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Order of SUBSTR and UPPER in statement

2008-02-13 Thread Michael Fuhr
') > > > The fieldtype of "Firma" is character varying. > > The only difference is the order of UPPER and SUBSTR. I doubt that; I suspect the query that's failing has some other problem that's causing the syntax error. Take a closer look, especially at the end of the query string ("syntax error at end of input"). -- Michael Fuhr ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Order of SUBSTR and UPPER in statement

2008-02-14 Thread Michael Fuhr
MEN"."BonMAZahl","FIRMEN"."BonZahlung","FIRMEN"."Betreuer","FIRMEN"."Com_Wahl","FIRMEN"."Symbol","FIRMEN"."ErfDat","FIRMEN"."ErfUser","FIRMEN"."L_Dat","FIRMEN"."L_User","FIRMEN"."RecordID","FIRMEN"."Z_Import_PK","FIRMEN"."Z_Import_FK","FIRMEN"."KreditkInh","FIRMEN"."Br > anchenTyp1","FIRMEN"."BranchenTyp2","FIRMEN"."KK_Exp_J","FIRMEN"."KK_Exp_M","FIRMEN"."Kategorie" > > FROM "FIRMEN" > WHERE "FIRMEN"."RecordID" IN (SELECT DISTINCT "X"."RecordID" FROM "FIRMEN" > "X" INNER JOIN "FIRMEN" "Y" ON > COALESCE(UPPER(SUBSTR("X"."Firma",1,7)) = I haven't examined the entire query but the above line appears to be the problem. Did you mean to write the following? COALESCE(UPPER(SUBSTR("X"."Firma",1,7)),'') = > COALESCE(UPPER(SUBSTR("Y"."Firma",1,7)),'') AND > COALESCE(UPPER("X"."PLZZ"),'') = COALESCE(UPPER("Y"."PLZZ"),'') AND > COALESCE(UPPER("X"."PLZP"),'') = COALESCE(UPPER("Y"."PLZP"),'') AND > "X"."RecordID" <> "Y"."RecordID") -- Michael Fuhr ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Order of SUBSTR and UPPER in statement

2008-02-14 Thread Michael Fuhr
On Thu, Feb 14, 2008 at 04:48:33PM +0100, Hermann Muster wrote: > Michael Fuhr schrieb: >>> COALESCE(UPPER(SUBSTR("X"."Firma",1,7)) = >> >> I haven't examined the entire query but the above line appears to >> be the problem. Did y

Re: [GENERAL] beginner postgis question lat/lon

2008-02-28 Thread Michael Fuhr
ond pair of coordinates, and coordinates should be (X Y) therefore (lon lat) instead of (lat lon). Try this: insert into routes_geom values(1, 'J084', GeomFromText('LINESTRING(-121.00 38.20, -118.00 38.20)', 4326)); You might wish to subscribe to the postgis-users mai

Re: [GENERAL] what happens if something goes wrong in transaction?

2008-02-28 Thread Michael Fuhr
). > I'm using php to make all these calls and they have all to be succesfull or > no one of them should be carried out. That's the behavior you'll get if you use a transaction. No changes will be visible to other transactions until you successfully com

Re: [GENERAL] table of US states' neighbours

2008-03-27 Thread Michael Fuhr
VA|{DC,KY,MD,NC,TN,WV} VT|{MA,NH,NY} WA|{ID,OR} WI|{IA,IL,MI,MN} WV|{KY,MD,OH,PA,VA} WY|{CO,ID,MT,NE,SD,UT} -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgres Encoding conversion problem

2008-04-23 Thread Michael Fuhr
equivalent in "SJIS" > > > > I have no idea what character this is, I cannot view it in my > > browser, etc. > > It translates to Unicode 10BB7, which is not defined. Actually it's . http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=20BB7 -- Michael Fu

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Michael Fuhr
select regexp_replace( '[p=1242|John Smith]', e'\\[p=(\\d+)\\|(.+?)\\]', e'\\2' ); regexp_replace --- John Smith Caution: this method doesn't do HTML entity escaping so if your input isn't trustworthy then y

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Michael Fuhr
tly psql doesn't like that. I don't see that sequence in my original message: 73 65 6c 65 63 74 20 72 65 67 65 78 70 5f 72 65 |select regexp_re| 0010 70 6c 61 63 65 28 0a 20 20 20 27 5b 70 3d 31 32 |place(. '[p=12| -- Michael Fuhr -- Sent via pgsql-gener

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Michael Fuhr
link_expand > --- > John Smith] and [p=456|Jane Doe > (1 row) > > Hey, I told it not to be greedy, didn't I? Yes, but regexp_replace only replaces that part of the original string that matches the regular expression -- the rest it leaves alone. -- Michael Fuhr -

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-10 Thread Michael Fuhr
On Tue, Jun 10, 2008 at 07:41:53AM -0600, Michael Fuhr wrote: > On Tue, Jun 10, 2008 at 02:59:53PM +0200, Leif B. Kristensen wrote: > > So far, so good. But look here: > > > > pgslekt=> select link_expand('[p=123|John Smith] and [p=456|Jane Doe]'); > >

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Michael Fuhr
have enable_nestloop = off? If so, do you get a better plan if you enable it? Also, have you run ANALYZE lately? -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-16 Thread Michael Fuhr
On Sat, Jun 14, 2008 at 02:35:38PM -0400, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I created a test case that has close to the same estimated and > > actual row counts and has the same plan if I disable enable_nestloop: > > There's something w

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Michael Fuhr
t > this has no effect. How can I sort this problem? Client_encoding =UTF8. Is the data UTF-8? If the error is 'invalid byte sequence for encoding "UTF8": 0xa3' then you probably need to set client_encoding to latin1, latin9, or win1252. -- Michael Fuhr -- Sent via pgs

Re: [GENERAL] UTF8 encoding problem

2008-06-18 Thread Michael Fuhr
On Wed, Jun 18, 2008 at 08:25:07AM +0200, Giorgio Valoti wrote: > On 18/giu/08, at 03:04, Michael Fuhr wrote: > > Is the data UTF-8? If the error is 'invalid byte sequence for > > encoding "UTF8": 0xa3' then you probably need to set client_encoding > >

Re: [GENERAL] Vacuum and inserts

2008-06-19 Thread Michael Fuhr
avoid this, it is necessary to vacuum every table in every database at least once every two billion transactions." -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] test aggregate functions without a dummy table

2008-06-20 Thread Michael Fuhr
t max(foo) from generate_series(1, 100) as g(foo); max - 100 (1 row) -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Unicode problem again

2008-06-26 Thread Michael Fuhr
aying application expects data in one encoding but you give it data in a different encoding then non-ASCII characters might not display correctly. -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Unicode problem again

2008-06-26 Thread Michael Fuhr
On Thu, Jun 26, 2008 at 03:31:01PM +0200, Albe Laurenz wrote: > Michael Fuhr wrote: > > Your input data seems to have a mix of encodings: sometimes you're > > getting pound signs in a non-UTF-8 encoding, but if characters like > > got into the database when > >

Re: [GENERAL] Altering a column type w/o dropping views

2008-07-07 Thread Michael Fuhr
tory structure that's under revision control) then you can write a deployment script like the following (to be executed via psql): BEGIN; DROP VIEW view_name; ALTER TABLE table_name ALTER column_name TYPE type_name; \i views/view_name.sql COMMIT; -- Michael Fuhr -- Sent via pgsql-general m

Re: [GENERAL] index speed and failed expectations?

2008-08-04 Thread Michael Fuhr
s=10 width=12) (actual time=3240.976..3800.038 rows=10 loops=1) Sort Key: start_time -> Seq Scan on stats (cost=0.00..1541.00 rows=10 width=12) (actual time=0.091..500.853 rows=10 loops=1) Total runtime: 4226.870 ms (4 rows) -- Michael Fuhr -- Sent via pgsql-gen

Re: [GENERAL] Cluster Up-time.

2008-08-18 Thread Michael Fuhr
nd uptime: SELECT pg_postmaster_start_time(); SELECT now() - pg_postmaster_start_time(); -- Michael Fuhr -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] client_encoding / postgresql strange behaviour

2008-09-16 Thread Michael Fuhr
probably did perform the correct conversion but your display is really something other than latin1, probably win1252 or another Windows encoding. Try setting client_encoding to win1252, which is supported in 8.1 and later. What version are you running? Since you refer to UNICODE (8.0 and earlier) inst

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-20 Thread Michael Fuhr
so the manual page for the ldd command if your system has it. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-21 Thread Michael Fuhr
sue that has nothing to do with PostgreSQL, aside from the fact that in this particular case you're trying to link against a PostgreSQL library. You'll have the same problem any time you link against a shared library that's not in the run-time linker's path.

Re: [GENERAL] libpq & its header files

2005-02-21 Thread Michael Fuhr
e most recent version: http://www.postgresql.org/docs/8.0/static/libpq.html The introductory text mentions the header file that programs need to include. See also the "Building libpq Programs" and "Example Programs" sections. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] tables & retrieving their names

2005-02-21 Thread Michael Fuhr
ot; in the documentation: http://www.postgresql.org/docs/8.0/static/libpq.html If you're new to PostgreSQL, it might be useful to go through the Tutorial and then skim the rest of the documentation. The FAQ might also answer some of your questions. http://www.postgres

Re: [GENERAL] How to Prevent Certain Kinds of Joins?

2005-02-22 Thread Michael Fuhr
hen users could still do joins on the client side if they had access to all the data. Are you just trying to prevent potentially large queries? What problem are you trying to solve? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)

Re: [GENERAL] tsearch2 problems / limitations

2005-02-23 Thread Michael Fuhr
eport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("value is too big"))); MAXSTRPOS is defined in tsvector.h: #define MAXSTRPOS ( 1<<20 ) Maybe Oleg will reply and say whether it's safe to change that or not. -- Michael Fuhr http://www.fuhr

Re: [GENERAL] Help with queries...

2005-02-24 Thread Michael Fuhr
Syntax" chapter of the documentation, especially the parts that talk about case and quoting: http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)

Re: [GENERAL] Referencing created tables fails with message that they do not exist!

2005-02-28 Thread Michael Fuhr
that you created the tables in mixed case and didn't quote their names when you tried to query them? If so, then you might want to read "Identifiers and Key Words" in the "SQL Syntax" chapter of the documentation. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---

Re: [GENERAL] Referencing created tables fails with message that

2005-02-28 Thread Michael Fuhr
.XYZ" Column | Type | Modifiers +-+--- I | integer | SELECT "I" FROM "XYZ"; -- works SELECT I FROM XYZ; -- fails -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL]

2005-02-28 Thread Michael Fuhr
torial.html http://www.postgresql.org/docs/ -- 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] Is any limitations in PostgreSQL?

2005-02-28 Thread Michael Fuhr
In addition to the built-in types, users can create their own types. > 3. What's the restriction for the table and the > collection? See the aforementioned FAQ. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)---

Re: [GENERAL] cursor already in use error

2005-03-02 Thread Michael Fuhr
d example that demonstrates the problem? Please show definitions of Parts and PartNeedsReschedule and some sample data -- enough that somebody could copy what you post into a test database and duplicate the problem. It'll be easier to help if we can see exactly what you're do

Re: [GENERAL] cursor already in use error

2005-03-02 Thread Michael Fuhr
losing the cursor when you're done with it. Will closing it work in the real code? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-noma

Re: [GENERAL] aggregate functions on massive number of rows

2005-03-02 Thread Michael Fuhr
ou might have more luck with one of the other procedural languages (PL/Perl, PL/Tcl, PL/Python, etc.), but I'd consider coding something like this in C if I were using it with so much data. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)

Re: [GENERAL] getting attribute names, types

2005-03-06 Thread Michael Fuhr
ibpq documentation. http://www.postgresql.org/docs/8.0/interactive/catalogs.html http://www.postgresql.org/docs/8.0/interactive/information-schema.html http://www.postgresql.org/docs/8.0/interactive/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO -- Michael Fuhr http://www.fuhr.org/~mfuhr/ -

Re: [GENERAL] Pg 8.01 big trouble with LIMIT (bug !?)

2005-03-06 Thread Michael Fuhr
00174.php -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] LIMIT and him usage

2005-03-07 Thread Michael Fuhr
be what you're trying to do? What problem are you trying to solve? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] number of rows in a cursor

2005-03-07 Thread Michael Fuhr
p http://archives.postgresql.org/pgsql-general/2005-01/msg01312.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 datat

Re: [GENERAL] Move cursor

2005-03-08 Thread Michael Fuhr
PL/pgSQL parser; I don't know if that's intentional or an oversight. Maybe one of the developers will comment. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the un

Re: [GENERAL] Move cursor

2005-03-08 Thread Michael Fuhr
On Tue, Mar 08, 2005 at 12:16:28PM -0500, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > I don't think PL/pgSQL implements cursors fully. > > Its cursor facility is certainly far weaker than what's presently in the > main SQL language. I think

Re: [GENERAL] PostgreSQL still for Linux only?

2005-03-08 Thread Michael Fuhr
QL project itself appears to care about portability, so the question "Still for Linux only?" should really be directed at the third-party software that some people find useful. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Problem with inherited table, can you help?...

2005-03-10 Thread Michael Fuhr
atement that caused the violation. Some have suggested that PostgreSQL should use a weaker lock on the referenced key, but that hasn't been implemented yet. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] error codes in log file?

2005-03-10 Thread Michael Fuhr
. You could set log_error_verbosity to 'verbose', either cluster-wide in postgresql.conf, for a particular database with ALTER DATABASE, for a particular user with ALTER USER, or just for a particular session with SET. Verbose logging might show more than you want, but it'll show th

Re: [GENERAL] keeping track of when a row was last modified

2005-03-10 Thread Michael Fuhr
xample: http://www.postgresql.org/docs/8.0/interactive/plpgsql-trigger.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] MS Access to PostgreSQL

2005-03-11 Thread Michael Fuhr
http://www.postgresql.org/docs/8.0/interactive/functions-matching.html Here are some ways to make it work (dollar quoting available only in 8.0 and later): fullpath LIKE 'folderanother folder%' fullpath LIKE 'folder\\another folder\\%' ESCAPE '' fullpath LIKE

Re: [GENERAL] Unique Indexes

2005-03-11 Thread Michael Fuhr
ould you describe the problem you're trying to solve? It might be easier to help if we knew the ultimate purpose of what you're trying to do. Something like "I want to do this because" -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadca

  1   2   3   4   5   6   7   8   9   10   >