[HACKERS] Weird behaviour with subquery

2004-03-22 Thread Christopher Kings-Lynne
What's going on here: usa=> select user_id from users_users where joindate >= '2004-03-09'; ERROR: column "user_id" does not exist usa=> select * from shop_orders where user_id in (select user_id from users_users where joindate >= '2004-03-09'); [waits and waits and waits...have to cancel] ^CCan

[HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-22 Thread Christopher Kings-Lynne
I had a suspicion and it was confirmed: test=# create table oidtest (a int4, unique(oid)); NOTICE: CREATE TABLE / UNIQUE will create implicit index "oidtest_oid_key" for table "oidtest" CREATE TABLE test=# select oid from oidtest; oid - (0 rows) test=# alter table oidtest set without oids;

Re: [HACKERS] float8 regression test failure in head

2004-03-22 Thread Christopher Kings-Lynne
This has not yet been fixed... Chris Tom Lane wrote: Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: Attached are the test failures I'm currently getting. It looks like Neil didn't update expected/float8-small-is-zero.out for his recent changes (for which, shame on him)

Re: [HACKERS] pg_autovacuum next steps

2004-03-21 Thread Christopher Kings-Lynne
I think these configuration issues will become a lot easier if you make the autovacuum daemon a subprocess of the postmaster (like, say, the checkpoint process). Then you have access to a host of methods for storing state, handling configuration, etc. Yeah - why delay making it a backend proces

[HACKERS] SET WITHOUT CLUSTER patch

2004-03-18 Thread Christopher Kings-Lynne
Hi, I have done a patch for turning off clustering on a table entirely. Unforunately, of the three syntaxes I can think of, all cause shift/reduce errors: SET WITHOUT CLUSTER; DROP CLUSTER CLUSTER ON NONE; This is the new grammar that I added: /* ALTER TABLE SET WITHOUT CLUSTER */ | ALTER TAB

Re: [HACKERS] Will auto-cluster be in 7.5?

2004-03-18 Thread Christopher Kings-Lynne
This patch is done and will be applied soon. I'm a bit confused, why would you want to uncluster a table? You would want to remove the marker that says 'cluster this column in the future'. At the moment, there is no way of removing all markers from a table. Chris ---(e

Re: [HACKERS] Will auto-cluster be in 7.5?

2004-03-18 Thread Christopher Kings-Lynne
# CLUSTER * Automatically maintain clustering on a table * Add way to remove cluster specification on a table I've done the latter - it's been sent to -patches. However, I need someone to look at the shift/reduce problem I'm getting... Chris ---(end of broadcast

Re: [HACKERS] Further thoughts about warning for costly FK checks

2004-03-18 Thread Christopher Kings-Lynne
though I'd be worried about the portability price paid to have one. Or are you concerned about whether a GUI could invoke it? I don't see why not --- the GUIs don't reimplement pg_dump, do they? Actually Tom, I think they do (where they have an export facility). How would you run pg_dump on a re

[HACKERS] float8 regression test failure in head

2004-03-17 Thread Christopher Kings-Lynne
Attached are the test failures I'm currently getting. -bash-2.05b$ uname -a FreeBSD mir.internal 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Mon Sep 22 14:46:18 WST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MIR i386 Chris parallel group (13 tests): text name char varchar oid boolean int2

[HACKERS] relation_expr vs. qualified_name

2004-03-17 Thread Christopher Kings-Lynne
How come half the ALTER TABLE statements use relation_expr and half use qualified_name? Is one more correct now? Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Doxygen?

2004-03-17 Thread Christopher Kings-Lynne
I was thinking of writing a cron job to update the CVS tree and then build the documentation (takes about 10 minutes on my computer). Then I could push it to wherever you like. Are we currently maintaining two or three branches in the code? We may want to keep them seperate. We could also maint

Re: [HACKERS] Some one deleted pg_database entry how to fix it?

2004-03-16 Thread Christopher Kings-Lynne
Thanks, first of all it wasn't my mess, but someone elses. Secondly this worked however I was unable to use the same name, some remnants of the old database must have remained in pg_database. I couldn't even reindex it with postgres -O -P Maybe try a full dump and reload now? Chris -

[HACKERS] Custom format for pg_dumpall

2004-03-14 Thread Christopher Kings-Lynne
Hi, Why is there no custom format dump option for pg_dumpall? What if I want to use pg_dumpall to dump all db's and blobs? Or if I want to have a huge sql dump from which I can easily exract the sql to recreate just one table? Chris ---(end of broadcast)-

Re: [HACKERS] [PATCHES] log_line_info

2004-03-10 Thread Christopher Kings-Lynne
> Please don't. Declare them obsolete for 7.5 and remove them in a later > release. Nah, just remove them. We've removed, added and changed so many config options and no-one's ever complained... Chris ---(end of broadcast)--- TIP 2: you can get

Re: [HACKERS] About hierarchical_query of Oracle

2004-03-09 Thread Christopher Kings-Lynne
Try contrib/tablefunc Chris Li Yuexin wrote: > > Who can tell me how to complete /oracle's / /hierarchical_query > /through postgresql/。 / ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] grants

2004-03-09 Thread Christopher Kings-Lynne
hi there i'm having troubles to find how to GRANT SELECT ON all-tables-onmydb TO specificuser There isn't any such command. You need to write a stored procedure to do it for you in a loop. Chris ---(end of broadcast)--- TIP 1: subscribe and u

Re: [HACKERS] [PATCHES] NO WAIT ...

2004-03-08 Thread Christopher Kings-Lynne
If "NOWAIT" is the choice, I could live with it. If there's no objection, I will go with "NOWAIT", not "NO WAIT". How about "WITHOUT WAIT", which is like many of our other commands? Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaste

Re: [HACKERS] [ADMIN] Schema comparisons

2004-03-02 Thread Christopher Kings-Lynne
I recently had to figure out what was different between the "live" schema and the schema in cvs at work. This was a really painful process, and it occurred to me that it wouldn't be terribly hard to write a perl program to do it (I wound up using vim and diff). Is there interest in such a tool? I c

Re: [HACKERS] Tablespaces

2004-03-02 Thread Christopher Kings-Lynne
I've been looking at implementing table spaces for 7.5. Some notes and implementation details follow. Ah sorry, other things you might need to consider: Privileges on tablespaces: GRANT USAGE ON TABLESPACE tbsp TO ...; Different disk settings for different tablespaces (since they will likely be

Re: [HACKERS] API Layers within Postgres

2004-03-02 Thread Christopher Kings-Lynne
How easy is to to get cursor access to the indexes and fine grained control of the transaction system, are their fairly clean internal APIs I can leverage. I'm not sure 'PostgreSQL' and 'fairly clean internal API' go together :P Chris ---(end of broadcast)-

Re: [HACKERS] Tablespaces

2004-03-02 Thread Christopher Kings-Lynne
A table space parameter will be added to DDL commands which create physical database objects (CREATE DATABASE/INDEX/TABLE/SEQUENCE) and to CREATE SCHEMA. The associated routines, as well as the corresponding DROP commands will need to be updated. Adding the ability to ALTER TABLESPACE seems a lit

Re: [HACKERS] [GENERAL] select statement against pg_stats returns

2004-02-24 Thread Christopher Kings-Lynne
Why? You can reconstruct it with a simple "ANALYZE" command. Dumping and restoring would mean nailing down cross-version assumptions about what it contains, which doesn't seem real forward-looking... I seem to recall that people like that kind of thing so that the dump is really the current stat

Re: [HACKERS] [GENERAL] select statement against pg_stats returns

2004-02-24 Thread Christopher Kings-Lynne
I don't think so --- we weren't trying to use it as an actual column datatype back then. 7.4 has a problem though :-( ... this is one of the "damn I wish we'd caught that before release" ones, since it can't easily be fixed without initdb. Reminds me that I need to get to work on making pg_upgrade

[HACKERS] user defined function in CHECK constraint

2004-02-23 Thread Christopher Kings-Lynne
Hi, I've just talked to a few users on IRC who cannot restore dumps because they use user-defined functions in CHECK constraints. Any chance this will be fixed using dependencies? Or maybe it's just easy to put all ADD CHECKs at the very end? Chris ---(end of broadcas

[HACKERS] unqualified function calls in system_views.sql

2004-02-18 Thread Christopher Kings-Lynne
Do these need to be fixed in backend/catalog/system_views.sql to have pg_catalog. before everything? eg. CREATE VIEW pg_rules AS SELECT N.nspname AS schemaname, C.relname AS tablename, R.rulename AS rulename, pg_get_ruledef(R.oid) AS definition FROM (pg_re

Re: [HACKERS] casting zero-length strings

2004-02-16 Thread Christopher Kings-Lynne
Yes, surely, unless someone wants to argue for reverting that change to pg_atoi. I can't see a reason for having them act inconsistently. While we are at it we should make sure these functions are all on the same page about allowing leading/trailing whitespace. I seem to recall that the spec says

Re: [PATCHES] [HACKERS] dollar quoting

2004-02-16 Thread Christopher Kings-Lynne
Parsing is a whole nother ball of wax besides lexing. I wasn't planning to put *that* into psql. Remember the only thing psql really wants from this is to detect where end-of-statement is ... Forgive my lameness, but I've never truly figured out where parsing ends and lexing begins. Anyone care

Re: [PATCHES] [HACKERS] dollar quoting

2004-02-16 Thread Christopher Kings-Lynne
Actually, I thought the way to handle it would be to duplicate the backend lexer as nearly as possible. Most of the productions would have empty bodies probably, but doing it that way would guarantee that in fact psql and the backend would lex a string the same way, which is exactly the problem we

Re: [HACKERS] Concurrence GiST

2004-02-15 Thread Christopher Kings-Lynne
Hey Teodor, How's this going? I think you were looking at the same paper I was reading about GiST indexes. I found the GiST source code somewhat over my head, however. I hope you'll still working on it and haven't given up! Chris Teodor Sigaev wrote: Hi! I'll have time and wish to work on

Re: [HACKERS] No Timeout in SELECT..FOR UPDATE

2004-02-15 Thread Christopher Kings-Lynne
(1) Re-write the "SELECT...FOR UPDATE" SQL code, to return with an exception or error if it cannot immediately secure the lock, OR: You could use SET STATEMENT_TIMEOUT... Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, pleas

Re: [HACKERS] pg_restore problems and suggested resolution

2004-02-13 Thread Christopher Kings-Lynne
As an implementation issue, I wonder why these things are hacking permanent on-disk data structures anyway, when what is wanted is only a temporary suspension of triggers/rules within a single backend. Some kind of superuser-only SET variable might be a better idea. It'd not be hard to implement,

Re: [HACKERS] Summary of Changes since last release (7.4.1)

2004-02-10 Thread Christopher Kings-Lynne
- All operations on TEMP relations are no longer logged in WAL, nor are they involved in checkpoints, thus improving performance. (Tom) That is great news! Looking forward to 7.5 already, I could have sworn that the above was done in 7.4, by Tom...? Chris ---(end of bro

Re: [HACKERS] MS SQL features for new version

2004-02-10 Thread Christopher Kings-Lynne
Just stumbled upon this. just an FYI, http://www.microsoft.com/sql/yukon/productinfo/top30features.asp Also, kick-arse Oracle analytic features: http://www.akadia.com/services/ora_analytic_functions.html Chris ---(end of broadcast)--- TIP 3: if po

Re: [HACKERS] SSL mode annoyance

2004-02-10 Thread Christopher Kings-Lynne
Does this mean that libpq always attempts to connect in SSL mode and then falls back? IIRC, that is the behavior pre-7.4, but you can choose other behaviors in 7.4. This is 7.4.1, server and client. Chris ---(end of broadcast)--- TIP 7: don't for

[HACKERS] SSL mode annoyance

2004-02-09 Thread Christopher Kings-Lynne
Hey guys, I just set up a remote SSL port to our production db servers. Yeah, yeah, it's iffy, but management... I generated a server.crt and server.key as per docs. I set ssl = true in postgresql.conf I put this in pg_hba.conf: hostnosslallall 127.0.0.1 255.255.255.255

Re: [HACKERS] Timestamps

2004-02-09 Thread Christopher Kings-Lynne
I wanted to ask a simple question. Say I have a table with the timestamp field. What is the best way to say get all the records that were created say 2 hours before the query. One of the options would be to generate the timestamp in the correct format and then send a query in the format SELECT * f

Re: [HACKERS] It's past time to redo the smgr API

2004-02-05 Thread Christopher Kings-Lynne
* AFAICS the only downside of not having a Relation available in smgr.c and md.c is that error messages could only refer to the RelFileNode numbers and not to the relation name. I'm not sure this is bad, since in my experience what you want to know about such errors is the actual disk filename, wh

Re: [HACKERS] PostGIS Integration

2004-02-04 Thread Christopher Kings-Lynne
Those two cases are not hard, because in those scenarios the parser knows it is expecting a type specification. The real problem is this syntax for typed literals: typename 'string' which occurs in ordinary expressions. So when you see "name(" you aren't real sure if you're seeing

Re: [HACKERS] PostGIS Integration

2004-02-04 Thread Christopher Kings-Lynne
I can't see any way to handle parameterized types without extending the grammar individually for each one --- otherwise it's too hard to tell them apart from function calls. That makes it a bit hard to do 'em as plug-ins :-(. The grammar hacks are certainly ugly though, and if someone could think

Re: [HACKERS] Recursive queries?

2004-02-03 Thread Christopher Kings-Lynne
There is a website somewhere where a guy posts his patch he is maintaining that does it. I'll try to find it... Found it. Check it out: http://gppl.terminal.ru/index.eng.html Patch is current for 7.4, Oracle syntax. Chris ---(end of broadcast)-

Re: [HACKERS] Recursive queries?

2004-02-03 Thread Christopher Kings-Lynne
Andrew Overholt did some work on SQL99 recursive queries, but went back to university without having gotten to the point where it actually worked. One of the many things on my to-do list is to pick up and finish Andrew's work on this. If someone has time to work on it, let me know and I'll try to

[HACKERS] Recursive queries?

2004-02-03 Thread Christopher Kings-Lynne
Is there anyone working on recursive queries for 7.5? I know there is a patch that implements it on 7.4 (I can't seem to find the guy's webpage), but that uses Oracle syntax. Wasn't there some guy at RedHat doing it? Is RedHat working on PITR? Chris ---(end of broadc

[HACKERS] pg_stat_activity

2004-02-02 Thread Christopher Kings-Lynne
Hi guys, In what version of Postgres did the pg_stat_activity view appear? Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [HACKERS] Idea about better configuration options for sort memory

2004-02-01 Thread Christopher Kings-Lynne
Seems OK to me, in fact maybe preferred. But I wonder if we should emit a NOTICE when old names are used with SHOW and SET commands? A WARNING should be issued. Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [HACKERS] Disaster!

2004-01-26 Thread Christopher Kings-Lynne
Just for the record, the Canaveral you are thinking about is derived from the spanish word "Cañaveral", which is a place where "cañas" grow (canes or stems, according to my dictionary -- some sort of vegetal living form anyway). I suppose Cape Kennedy was filled with those plants and that's what t

Re: [HACKERS] Disaster!

2004-01-26 Thread Christopher Kings-Lynne
Awesome Tom :) I'm glad I happened to have all the data required on hand to fully analyze the problem. Let's hope this make this failure condition go away for all future postgresql users :) Chris On Mon, 26 Jan 2004, Tom Lane wrote: > Okay ... Chris was kind enough to let me examine the WAL l

Re: [HACKERS] Disaster!

2004-01-24 Thread Christopher Kings-Lynne
> That request to look at your WAL files is still open ... I've sent you it privately - let me know how it goes. Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Disaster!

2004-01-24 Thread Christopher Kings-Lynne
After more staring at the code, I have a theory. SlruPhysicalWritePage and SlruPhysicalReadPage are coded on the assumption that close() can never return any interesting failure. However, it now occurs to me that there are some filesystem implementations wherein ENOSPC could be returned at close(

Re: [HACKERS] What's planned for 7.5?

2004-01-24 Thread Christopher Kings-Lynne
-COMMENT ON [ CAST | CONVERSION | OPERATOR CLASS | LARGE OBJECT | LANGUAGE ] (Christopher) Hey Bruce, You probably should add 'Dump LOB comments in custom dump format' to the todo. That's the last part of that task above which I haven't done yet, and for various reasons probably won't have tim

Re: [HACKERS] Disaster!

2004-01-23 Thread Christopher Kings-Lynne
What should I do now? Go home and get some sleep ;-). If the WAL replay succeeded, you're up and running, nothing else to do. Cool, thanks heaps Tom. Are you interested in real backtraces, any of the old data directory, etc. to debug the problem? Obviously it ran out of disk space, but surely

Re: [HACKERS] Disaster!

2004-01-23 Thread Christopher Kings-Lynne
I'd suggest extending that file with 8K of zeroes (might need more than that, but probably not). OK, I've done dd if=/dev/zero of=zeros count=16 Then cat zero >> 000D Now I can start it up! Thanks! What should I do now? Chris ---(end of broadcast)

Re: [HACKERS] Disaster!

2004-01-23 Thread Christopher Kings-Lynne
I'd suggest extending that file with 8K of zeroes (might need more than that, but probably not). How do I do that? Sorry - I'm not sure of the quickest way, and I'm reading man pages as we speak! Thanks Tom, Chris ---(end of broadcast)--- TIP 4:

Re: [HACKERS] Disaster!

2004-01-23 Thread Christopher Kings-Lynne
t's 4am my time :( ) Thanks, Chris Christopher Kings-Lynne wrote: We ran out of disk space on our main server, and now I've freed up space, we cannot start postgres! Jan 23 12:18:50 canaveral postgres[563]: [2-1] LOG: checkpoint record is at 2/96500B94 Jan 23 12:18:50 canaveral

[HACKERS] Disaster!

2004-01-23 Thread Christopher Kings-Lynne
We ran out of disk space on our main server, and now I've freed up space, we cannot start postgres! Jan 23 12:18:50 canaveral postgres[563]: [2-1] LOG: checkpoint record is at 2/96500B94 Jan 23 12:18:50 canaveral postgres[563]: [3-1] LOG: redo record is at 2/964BD23C; undo record is at 0/0; s

Re: [HACKERS] Permissions and PGSQL

2004-01-22 Thread Christopher Kings-Lynne
Well, I have about half a patch for column privileges lying around, but I've never had enough motivation to do the other, more complicated half... Is there a TODO and TODO.detail warrented here? I thought views took care of this. Comments? They're needed for SQL99 anyway I think. Chris ---

[HACKERS] SET WITHOUT OIDS and VACUUM badness?

2004-01-21 Thread Christopher Kings-Lynne
This is what we did: 0. BEGIN; 1. ALTER TABLE ... SET WITHOUT OIDS 2. A bunch of things are selected out of this table and inserted into another (using INSERT ... SELECT) 3. An index is created on a timestamp field on this table 4. Then there's an update on a related table, that selects stuff

Re: [HACKERS] [Fwd: plpgsql and booleans?]

2004-01-20 Thread Christopher Kings-Lynne
EXECUTE ''UPDATE test_table SET test_col '' || quote_literal(NEW.test_col2) || '';''; Seems it'd be easier without EXECUTE: UPDATE test_table SET test_col = NEW.test_col2; Actually, yes you're right - we don't need EXECUTE in our case. However, it still doesn't answer the question of how you

[HACKERS] [Fwd: plpgsql and booleans?]

2004-01-19 Thread Christopher Kings-Lynne
Hi guys, When writing a PL/pgSQL trigger function how do you handle the case : EXECUTE ''UPDATE test_table SET test_col '' || quote_literal(NEW.test_col2) || '';''; where test_col and test_col2 are boolean fields? The case above gives : ERROR: function quote_literal(boolean) does not exist An

Re: [HACKERS] [7.4] "permissions problem" with pl/pgsql function

2004-01-19 Thread Christopher Kings-Lynne
420_test=> select dropgeometrycolumn('420_test','lroadline61','roads61_geom'); ERROR: permission denied for relation pg_attribute CONTEXT: PL/pgSQL function "dropgeometrycolumn" line 19 at execute statement the database was created as: CREATE DATABASE WITH OWNER = and I'm connected to the da

Re: [HACKERS] User Defined Functions/AM's inherently slow?

2004-01-17 Thread Christopher Kings-Lynne
Theory B would be that there's some huge overhead in calling non-built-in functions on your platform. We do know that looking up a "C" function is significantly more expensive than looking up a "builtin" function, but there should only be half a dozen such calls involved in this test case; it's ha

[HACKERS] Log rotation for pg_autovacuum

2004-01-15 Thread Christopher Kings-Lynne
Hi, What's the best way to do log rolling with pg_autovacuum? It doesn't seem to have any syslog options, etc. Using 'tee' maybe? Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-

Re: [HACKERS] Make SHOW command subqueriable?

2004-01-15 Thread Christopher Kings-Lynne
So neat in fact that it has been implemented. SELECT * FROM pg_settings; Damn! I knew that as well! *sigh* I'm not thinking right from my current 'shocking postgres performance problems nightmare day' today :( Think massively concurrent table that almost everything on the site relates to caus

[HACKERS] Make SHOW command subqueriable?

2004-01-15 Thread Christopher Kings-Lynne
Is this a neat idea? SELECT * FROM (SHOW ALL); eg. SELECT * FROM tab WHERE character_length(f) > (SHOW block_size); etc. Chris ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining colum

[HACKERS] Using storage MAIN

2004-01-15 Thread Christopher Kings-Lynne
Hi guys, Quick question about how column storage works. If you set a TEXT field to be storage MAIN, does this place a limit on the amount of data that can be stored in the row (eg. 8k?) Chris ---(end of broadcast)--- TIP 2: you can get off all l

Re: [HACKERS] Reserved words and named function parameters

2004-01-13 Thread Christopher Kings-Lynne
Any opinions which to do, or alternate proposals? I'm leaning slightly to #2, since I doubt anyone is trying to use "IN" as a function name, but ... One addition. The information_schema.parameters view will need to be updated to reflect parameter names. http://www.postgresql.org/docs/7.4/static

Re: [HACKERS] [COMMITTERS] pgsql-server/ oc/src/sgml/catalogs.sgml

2004-01-07 Thread Christopher Kings-Lynne
AFAICS, you're sending From: =?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <[EMAIL PROTECTED]> which is an instance of the encoding scheme Bruno mentioned. I have never heard that it is only supposed to be used in Subject: ... certainly there are a ton of people besides you who use it in From:. So I

Re: [HACKERS] Composite GiST indexes?

2004-01-05 Thread Christopher Kings-Lynne
Is it possible to make a composite GiST index? I want to create an index on a txtidx and a timestamp column - is that at all possible? OK, this is what I'm trying (7.3.4): create index blah on forums_posts using gist(ftiidx, datetime); ERROR: data type timestamp with time zone has no default o

[HACKERS] Composite GiST indexes?

2004-01-04 Thread Christopher Kings-Lynne
Is it possible to make a composite GiST index? I want to create an index on a txtidx and a timestamp column - is that at all possible? Chris ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [HACKERS] Remote Procedures

2004-01-04 Thread Christopher Kings-Lynne
Try the contrib/dblink module. Chris A E wrote: Hi, I was wondering is there or will there be support for remote procedures/functions in Postgresql? Not only server to server, but database to database? Such as calling a function in DB "B" from DB "A" or Server Gaia DB "B" from Server Zeus D

Re: [HACKERS] Anything akin to an Evaluate Statement in Postgresql?

2004-01-04 Thread Christopher Kings-Lynne
Was wondering if there was anything akin to an evaluate statement in Postgresql for dynamic strings? By dint of tricky programming you can a function that can generate and execute arbitrary strings. I believe there's even an example of this in the docs. Chris ---(end o

Re: [HACKERS] time format

2004-01-02 Thread Christopher Kings-Lynne
Create table with type TIMESTAMP(0) Chris ivan wrote: how can i change default time format because now i have for example 2004-01-01 16:51:46.995927 but i want only 2004-01-01 16:51:46, with out millisec. a tryed with Data-Style but there arent custom style :/ ---(end o

Re: Postgres + Xapian (was Re: [HACKERS] fulltext searching via a

2004-01-02 Thread Christopher Kings-Lynne
I think one way of attacking the problem would be using the existing nbtree by allowing it to store the five btrees. First read the README in the nbtree dir, and then poke at the metapage's only structure. You will see that it has a BlockNumber to the root page of the index. Try modifying that t

[HACKERS] Objects in schemas question

2003-12-30 Thread Christopher Kings-Lynne
Hi, quick questions related to phpPgAdmin development. 1. What objects can possibly appear in the pg_temp* schemas? Is it just tables, views and sequences? 2. As above, but the pg_toast schema. Tables only here? 3. Am I guaranteed that a temp schema is 'pg_temp_*' and a toast one is 'pg_toas

Re: [HACKERS] sticky sequence

2003-12-30 Thread Christopher Kings-Lynne
I cannot get rid of a sequence: gis=# drop sequence geopol.geology_gid_seq; ERROR: cache lookup of relation 8511697 failed Yes, geology_gid_seq have been created as a consequence of a geology.gid attribute of type serial. And.. yes, I've removed the relation with a delete on pg_cl

Re: [HACKERS] select from table with unique values

2003-12-28 Thread Christopher Kings-Lynne
how to do select from same table to get only unique values from same column(s) ? SELECT DISTINCT a, b FROM tab; or even: SELECT DISTINCT ON (a) a, b FROM tab; Chris ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [HACKERS] Permissions and PGSQL

2003-12-23 Thread Christopher Kings-Lynne
I use PgSql for a lot of our company's need and I lack some features. I would like to know if there is plans to implement: - User permissions based on columns? (Ex: User1 has Select on Column "CompayName" but User2 has update on column "CompanyName" while User3 has create new row on table). These d

[HACKERS] cascading column drop to index predicates

2003-12-21 Thread Christopher Kings-Lynne
Hey Tom, With regards to our previous conversation about dropping columns now properly dropping indexes that contain predicates that reference that column, I now find it a bit disconcerting that such indexes are automatically removed when the column is dropped, instead of requiring a CASCADE.

Re: [HACKERS] [pgsql-advocacy] PostgreSQL speakers needed for OSCON 2004

2003-12-20 Thread Christopher Kings-Lynne
Alternately, maybe it's time to try to get the fundraising operation into gear. Greg? What's our status for setup? My goal is to have everything done by January 31st. Speaking of fund raising, SourceForge has just started a 'donations' system whereby people can donate money to projects. Mayb

[HACKERS] Full text search reference

2003-12-18 Thread Christopher Kings-Lynne
For those working on search features, here's a new collection of essays on full text indexing mentioned on slashdot: http://www.tbray.org/ongoing/When/200x/2003/07/30/OnSearchTOC Chris ---(end of broadcast)--- TIP 2: you can get off all lists at o

[HACKERS] Oddness 7.3 vs 7.4

2003-12-15 Thread Christopher Kings-Lynne
I notice this in 7.3.4: test=# create table test (a int4, b int4); CREATE TABLE test=# create index idx on test(a) where b is null; CREATE INDEX test=# \d test Table "public.test" Column | Type | Modifiers +-+--- a | integer | b | integer | Indexes: idx

Re: [HACKERS] Resurrecting pg_upgrade

2003-12-14 Thread Christopher Kings-Lynne
Yeah. Don't you think that should preserve comments on large objects, now that such comments are alleged to be a supported facility? How does pg_dump dump the blobs? It dumps them, reloads them (which causes them to be assigned new OIDs) and then runs around and tries to fix up references to th

Re: [HACKERS] Resurrecting pg_upgrade

2003-12-14 Thread Christopher Kings-Lynne
How do you mean? pg_dump never writes out the COMMENT ON commands... Oh, okay, it doesn't work. Care to think about how to fix that? I think you're going to have to explain the exact problem to me - I don't quite get what you mean? Do you mean using pg_dump with the '-b' option? How does pg_

Re: [HACKERS] Resurrecting pg_upgrade

2003-12-14 Thread Christopher Kings-Lynne
No. Large object OIDs are preserved in the given proposal. (Note to self: I wonder whether the recently-added COMMENT ON LARGE OBJECT facility works at all over dump/reload...) How do you mean? pg_dump never writes out the COMMENT ON commands... Chris ---(end of broadca

Re: [HACKERS] Resurrecting pg_upgrade

2003-12-14 Thread Christopher Kings-Lynne
No. The proposed pg_upgrade procedure doesn't try to reproduce OIDs of catalog entries (other than toast-table OIDs, which are never preassigned anyway), so there's no issue. Good point though --- thanks for thinking about it. What about cached OIDs in view and function definitions, etc...? Like

Re: [HACKERS] Resurrecting pg_upgrade

2003-12-14 Thread Christopher Kings-Lynne
Per prior discussion, we will enforce some sort of limit on how often the representation of user tables/indexes can be changed. The idea will be to "batch" such changes so that you only have to do a dump/reload every N major releases instead of every one. In other words, pg_upgrade will work for

Re: [HACKERS] ERROR: Index pg_toast_8443892_index is not a btree

2003-12-09 Thread Christopher Kings-Lynne
I couldn't agree more. Look at this very instance. He now found the right reindex command and the corrupted file is gone. We don't have the slightest clue what happened to that file. Was it truncated? Did some other process scribble around in the shared memory? How do you tell now? The end user

Re: [HACKERS] ERROR: Index pg_toast_8443892_index is not a btree

2003-12-08 Thread Christopher Kings-Lynne
I get the following error when vacuuming a db or inserting a big value in a column of a toastable datatype (GEOMETRY). ERROR: Index pg_toast_8443892_index is not a btree My last action has been killing a psql that was getting mad about receiving too much input and beeping as hell (readline issue

Re: [HACKERS] Call for pg_dump testing

2003-12-07 Thread Christopher Kings-Lynne
and a dump that orders the two views arbitrarily. We can certainly add code to do something different, but are there any real-world cases where this is needed? The above example seems more than slightly made-up. The views aren't actually functional anyway (trying to use either would result in an

Re: [HACKERS] Call for pg_dump testing

2003-12-07 Thread Christopher Kings-Lynne
There's not currently any code for that, though I imagine we could invent some at need. Please provide example cases. create view v1 as select 1; create view v2 as select 1 + (select * from v1); create or replace view v1 as select * from v2; It seems to me that the only way to solve that one is to

[HACKERS] Build error?

2003-12-07 Thread Christopher Kings-Lynne
I just made distclean and then reconfigured with --with-openssl and I get this in HEAD: gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/home/chriskl/local/bin\" -c -o common.o common.c -MMD I

Re: [HACKERS] Call for pg_dump testing

2003-12-07 Thread Christopher Kings-Lynne
Hey Tom, I have committed some fairly wide-ranging revisions to pg_dump to make it dump database objects in a "safe" order according to the dependency information available from pg_depend. While I know that I have fixed a lot of previously-broken cases, it's hardly unlikely that I've broken some

Re: [HACKERS] Encoding problem with 7.4

2003-11-27 Thread Christopher Kings-Lynne
After installing 7.4 I created database completely from scratch with cyrillic locale: su postgres export LC_CTYPE=ru_RU.KOI8-R export LC_COLLATE=ru_RU.KOI8-R /usr/local/pgsql/bin/initdb -D /db2/pgdata You need to go: /usr/local/pgsql/bin/initdb -D /db2/pgdata -E KOI8 To set the default encoding t

[HACKERS] 7.5 Plans

2003-11-26 Thread Christopher Kings-Lynne
Hi everyone, I'm just interested in what everyone's personal plans for 7.5 development are? Shridar, Gavin and myself are trying to get the tablespaces stuff off the ground. Hopefully we'll have a CVS set up for us to work in at some point (we didn't think getting a branch and commit privs wa

Re: [HACKERS] pg_restore and create FK without verification check

2003-11-26 Thread Christopher Kings-Lynne
A common mistake, can't count how often I created this one... And not easy to find, because EXPLAIN won't explain triggers. I'm planning to create some kind of fk index wizard in pgAdmin3, which finds out about fks using columns that aren't covered by an appropriate index. Maybe this check could

Re: [HACKERS] A rough roadmap for internationalization fixes

2003-11-25 Thread Christopher Kings-Lynne
About storing data in the database, I would expect it to work with any encoding, just like I would expect pg to be able to store images in any format. What's stopping us supporting the other Unicode encodings, eg. UCS-16 which could save Japansese storage space. Chris -

Re: [HACKERS] Build farm

2003-11-24 Thread Christopher Kings-Lynne
Would it be reasonable to promote users testing daily snapshots with popular applications? I'm guessing there's not many applications that have automated test frameworks, but any that do would theoretically provide another good test of PGSQL changes. May I quote Joel on Software here? http://www.j

Re: [HACKERS] ALTER SEQUENCE enchancement

2003-11-23 Thread Christopher Kings-Lynne
Is there demand for this syntax: ALTER SEQUENCE ON table(col) CYCLE 100; It would allow us to become sequence-name independent... The above is an operation that would not help me a lot, but a way of performing currval() without knowing the sequence name would be good. It will help in cases suc

[HACKERS] ALTER SEQUENCE enchancement

2003-11-23 Thread Christopher Kings-Lynne
Hi, Is there demand for this syntax: ALTER SEQUENCE ON table(col) CYCLE 100; It would allow us to become sequence-name independent... Chris ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "

Re: [HACKERS] Executable files in CVS

2003-11-23 Thread Christopher Kings-Lynne
The other things that are executable look like they legitimately are scripts. If we consider that group-writability is bad (which ISTM we ought to) then there are a *ton* of files with the wrong permissions. I'd recommend getting Marc to fix it instead of hacking about with a one-file-at-a-time me

Re: [HACKERS] pg_dump dependency / physical hot backup

2003-11-23 Thread Christopher Kings-Lynne
Verifying zero rows in the freshly created table should be quite fast... It's hundreds of times faster to add an index to a full table than add rows to a table with an index. Chris ---(end of broadcast)--- TIP 2: you can get off all lists at onc

<    5   6   7   8   9   10   11   12   13   14   >