guc

From: Liam Stewart <liams(at)redhat(dot)com>
To: PostgreSQL Patches List <pgsql-patches(at)postgresql(dot)org>
Subject: guc
Date: 2002-01-17 21:54:34
Message-ID: 20020117165433.C19161@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


I was playing around with adding a couple new SET commands (REAL_FORMAT
and DOUBLE_PRECISION_FORMAT as per todo list item) and I ended up
playing with GUC a bit.

I've cleaned it up a bit - most of the changes should be fairly
self-explanitory from the patch. Some of the configuration options
handled in variable.c (so far, server_encoding and seed) have been moved
into guc.c and are handled by GUC. Moving them in required adding a
couple of fields to config_generic and friends - a read_only field and a
display_proc field (hook for custom SHOW messages). I've removed
GetConfigOption() and replaced it with ShowConfigOption() which does an
elog(NOTICE) instead of returning a string.

When setting REAL_FORMAT and DOUBLE_PRECISION_FORMAT, the printf-style
format string should be checked for certain things:

- field width of "*" is not allowed
- precision of ".*" is not allowed
- all conversion specifiers except "s" and "n" are allowed
- only one conversion specification other than %% and variations is
allowed

Does this seem reasonable to people? I haven't written a function to
check those yet.. will do soon.

This patch isn't complete yet so don't append it to the pending patches
list, Bruce.

Liam

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams(at)redhat(dot)com

Attachment Content-Type Size
patch.diff text/plain 42.7 KB

Responses

  • Re: [PATCHES] guc at 2002-01-17 22:35:24 from Peter Eisentraut
  • Re: guc at 2002-01-25 02:09:37 from Bruce Momjian
  • Re: guc at 2002-02-25 03:55:54 from Bruce Momjian

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-17 22:27:05 Re: Bug in pg_dump/restore -o
Previous Message Tom Lane 2002-01-17 21:47:28 Re: tuptoaster.c must *not* use SnapshotAny

Browse pgsql-patches by date

  From Date Subject
Next Message Elliot Lee 2002-01-17 22:04:09 postgresql-7.2b3-betterquote.patch
Previous Message Brent Verner 2002-01-17 12:28:45 Re: COPY when 'filename' is a directory