ere is about how to raise the *max* value for the sequence,
not how to set the current value higher. The sequence in question was
created with a too-low maximum value (see help on CREATE SEQUENCE for
options); the user now wants to raise it.
- J.
--
Joel BURTON | [EMAIL PROTECTED] | joelburton.
joel@joel=# select rtrim(rtrim('2.000'::numeric, '0'),'.');
rtrim
---
2
(1 row)
joel@joel=# select rtrim(rtrim('2.001'::numeric, '0'),'.');
rtrim
---
2.001
(1 row)
Easy enough to make this into a function trim_as_muc
ture? :)
>
> I'd say feature in that it doesn't reduce the precision of the number.
... and, of course, you can round with:
joel@joel=# select round('2.000'::numeric);
round
---
2
(1 row)
joel@joel=# select round('2.000'::numeric,2);
round
-
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 30, 2002 10:44 AM
> To: Joel Burton
> Cc: Alessio Bragadini; PostgreSQL Hackers
> Subject: Re: [HACKERS] wierd AND condition evaluation for plpgsql
>
>
> "Joel Bu
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Alessio
> Bragadini
> Sent: Thursday, May 30, 2002 9:04 AM
> To: PostgreSQL Hackers
> Subject: Re: [HACKERS] wierd AND condition evaluation for plpgsql
>
>
> On Tue, 20
l@joel=# select true and seeme();
NOTICE: seeme
?column?
--
t
(1 row)
In your case, the problem is short-circuiting a test, it's that the full
statement must be parsed and prepared, and it's probably in this stage that
the illegal use of old. in an insert jumps up.
HTH.
Joel BUR
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 24, 2002 1:33 PM
> To: Joel Burton
> Cc: Pgsql-Hackers@Postgresql. Org
> Subject: Re: [HACKERS] Exposed function to find table in schema search
> list?
>
> At the moment re
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 19, 2002 6:40 PM
> To: Joel Burton
> Cc: Joe Conway; Pgsql-Hackers@Postgresql. Org
> Subject: Re: [HACKERS] Exposed function to find table in schema search
> list?
>
>
> &
whenever we do this, and 7.3 could be as good a time as any.
- J.
Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> -Original Message-
> From: Joe Conway [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 19, 2002 5:25 PM
> To: Joel Burton
> Cc: Pgsql-Hackers@Postgresql. Org
> Subject: Re: [HACKERS] Exposed function to find table in schema search
> list?
>
>
> Joel Burton
oid of foo (given current search path)
findtable("s.foo") -> oid of s.foo
I can write something in plpgsql (iterating over the array, checking each,
etc.), however, it would be nice if something was already there.
Any ideas?
Thanks!
- J.
Joel BURTON | [EMAIL PROTECTED] | joelburton.com |
no one has put together docs on this feature, I'll
volunteer to write this up.
Thanks!
- J.
--
Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant
---(end of broadcast)--
Tom Lane <[EMAIL PROTECTED]> said:
> "Joel Burton" <[EMAIL PROTECTED]> writes:
> > Given that 98% of my function defining is done is psql, this would be
> > fine for me and solve my frustrations. It wouldn't help people that
> > build functions
defining is done is psql, this would be fine for me and
solve my frustrations. It wouldn't help people that build functions in scripting
languages or non-psql environments, however, but I don't know how common this is.
What do others think?
Thanks!
--
Joel BURTON | [EMAIL PROTECTED] | joe
> -Original Message-
> From: Peter Eisentraut [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 9:37 AM
> To: Joel Burton
> Cc: PostgreSQL Development
> Subject: RE: [HACKERS] Updated CREATE FUNCTION syntax
>
>
> Joel Burton writes:
>
> > Is th
ged, I
> guess.
Is there any standardized way of handling the single-quotes within function
definition? Rather than doubling them up (which can make for very messy code
when your scripting language uses single quotes!), allowing another symbol
to be used, with that symbol be declared in t
worried
about the security of truncate: the owner is the person who would understand
the ramifications of truncate vs. delete. Having it either emit a warning
that there were triggers/rules/RI or (better) requiring a FORCE parameter to
truncate when there are might make others f
> -Original Message-
> From: Christopher Kings-Lynne [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 12, 2002 10:17 PM
> To: Joel Burton; Tom Lane; Rod Taylor
> Cc: Hackers List
> Subject: RE: [HACKERS] TRUNCATE
>
>
> > I'm happy w/o the FORCE optio
important, though: it's very likely that I might want
to let an certain class of user DELETE a record (with all the usual
rules/triggers/RI applying), but not let them bypass all that to TRUNCATE.
But I still wouldn't want to see hassle-free truncation disappear in the
name of security or
et TRUNCATE do it), but if enough
people think that the FORCE keyword should be added to allow overriding of
triggers, that could be a good compromise.
But, please, don't take away the ability to TRUNCATE. Doing it when there
are triggers is one the strengths of TRUNCATE, IMNSHO.
- J.
completely unimportant: most of my work against PG is using shared,
persistent connections from a web app (Zope); it could take 20 mins to make
the initial connection and I'd still be happy. (Note to hackers: do not
implement this 20min connect, though. :) )
- J.
e
> exact hardware.
Interesting. Does anyone that has mentioned poor performance on cygwin have
any numbers to dispute this?
> Jason
Thanks for the info, and thanks for your work on the PG + cygwin stuff!
- J.
Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> -Original Message-
> From: Christopher Kings-Lynne [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 7:36 AM
> To: Joel Burton; Tom Lane; mlw
> Cc: Marc G. Fournier; [EMAIL PROTECTED]
> Subject: Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
>
>
> &
ot;).
So, I'm holding out hope that since this ISP seems unenlightened, one day
PostgreSQL will simply run in BSD jails without a cooperating jailmaster,
and it sounded like using the APR _might_ make this possible. (All of my
other projects use PG; I'd sure love to get this one switch
> "Joel Burton" <[EMAIL PROTECTED]> writes:
> >> Rather than propagating the SysV semaphore API still further, why don't
> >> we kill it now? (I'm willing to keep the shmem API, however.)
>
> > Would this have the benefit of allow Pos
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tom Lane
> Sent: Friday, May 03, 2002 6:07 PM
> To: mlw
> Cc: Marc G. Fournier; [EMAIL PROTECTED]
> Subject: Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
>
>
> Rather than propagating the SysV se
gure@,$$configure,g" \
---
> -e "s,@configure@,$(configure_args),g" \
Is there a reason to keep this change if it breaks this feature, or is there
an easy way to fix this? (I'm not a serious Makefile user, sorry!)
Thanks!
Joel BURTON | [EMAIL PROTECTED] | joelburton.
erce the value to the correct domain:
test=# select * from t2 where f='2'::typ;
f
---
(0 rows)
However, this works:
test=# select * from t2 where f='2'::char;
f
---
2
(1 row)
Is this a bug? Is this correct behavior? Am I misunderstanding this?
Thanks!
> You need to get your provider to set the sysctl jail.sysvipc_allowed to
> 1 in the host environment. If they're not willing to do this for you, we
> provide this feature on our servers, and also have a shared Postgres
> database you can use.
My ISP responds to this point:
"""
>In the thread on
> -Original Message-
> From: Alastair D'Silva [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 10:52 PM
> To: 'Vince Vielhaber'; 'Joel Burton'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [HACKERS] initdb dies during IpcSemaphoreCreate
ges
here that anyone knows of? Any hope of getting PG running in our jail? (Or,
alternatively, can PG run on the real machine's processes so that the
different jails can access it?)
Any help would be appreciated!
Thanks.
Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelbu
stencies: two "a"s
SELECT * FROM raw;
The issue is that there are no IDs over 10 that have another ID that is
exactly their value, so the first update to "dbl" does nothing.
The second time, w/o the ID>10 restriction, it finds 1(a), and double
that, 2(b), and adds 10; getting
where oid
> in grolist").
> I also quote the PotgreSQL user manual
> (http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/arrays.html):
In the contrib/ directory are procedures to search arrays for values.
This may help.
--
Joel BURTON | [EMAIL PROTEC
d
developer help, or for discussion among the gurus. Please post
general questions to pgsql-general or pgsql-novice and re-post
to pgsql-hackers only if you get no response w/in a week.
HTH,
--
Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton
Independent Knowledge Managem
On Wed, 10 Oct 2001, Dmitry Chernikov wrote:
> Hello,
>
> In dump file statement which grants permissions on view exists before
> statement which create view.
> For tables and sequences permissions dumped in correct order.
>
> --TOC Entry ID 124 (OID 150248)
> GRANT ALL on my_view to group sales;
ows 2000; recently, works with Windows 98
too. (Can't vouch for WinME, never touched the thing.)
www.cygwin.com
Can download it as part of the Cygwin package. You'll need to install
CygIPC (easily found via google, a simple binary install). Whole thing is
pretty much of a snap nowad
On 25 Jul 2001, Turbo Fredriksson wrote:
> >>>>> "Joel" == Joel Burton <[EMAIL PROTECTED]> writes:
>
> Joel> On 25 Jul 2001, Turbo Fredriksson wrote:
> >> Is there a way to debug a PL/pgSQL function? It's behaving very
>
On 25 Jul 2001, Turbo Fredriksson wrote:
> Is there a way to debug a PL/pgSQL function? It's behaving very irradic!
It's crude, but you can output debugging statements w/ RAISE NOTICE
or catch flawed assumptions by RAISE EXCEPTION.
--
Joel Burton <[EMAIL PROTECTED]>
Dire
On Fri, 4 May 2001, Peter Eisentraut wrote:
> Joel Burton writes:
>
> > I think, as little things in contrib/, it's easy for people to miss
> > these. With a project page, some discussion, etc. (& a place in contrib/),
> > more people would be able to use
sual text-type fields.
Look at the section on data types in the User's Manual for info.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
ot
sure how people feel about these kind of notices, though -- so, keep it
short, and obviously titled. "help!", for instance, should become "Seeking
PostgreSQL DBAs in Toronto, Canada"
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center
send me the links.
Collaborate w/Justin -- he has information about replication up at
techdocs.postgresql.org now.
Thanks,
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
T
memory at all), nor anything terribly strange,
but this is my first C function I'm turning loose on the world.
If you have a chance, I'd appreciate any feedback/pointers.
If it looks good / If I don't hear otherwise, I'll send it out to
pgsql-announce and pgsql-general early next
ng to use sed/perl/regexes, etc.?
If people can point to some best practices/ideas, I'd be happy to turn
them into a HOWTO.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)
because
one of the nice things about not having the field names appear is that
I can dump, change the field names, and re-slurp in the old dump.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
tement like "You're trying to change a value in
the table "c", using information in table "p", "id", but...")
If you don't have this, yes, you can look at in
the tgargs, but, given that its a bytea field, it's hard to
programmatically dig
On Thu, 26 Apr 2001, V. M. wrote:
> ok for serials, now i can extract from psql (\d tablename).
>
> But i'm not able to extract foreign keys from the schema.
Yes you can. Read my tutorial on Referential Integrity in the top section
at techdocs.postgresql.org.
--
Joel Bu
tion in PostgreSQL?
If this whole thing were a view, except w/o the WHERE clause, and we were
querying the view w/the b.name WHERE clause, would we still see a
performance boost from the right arrangement? (ie, does our criteria get
pushed down early enough in the joining process?)
TIA,
--
Jo
.
Is this actually correct?
2) The explicit-joins help suggests that manual structuring and
experimentation might help -- has anyone written (or could
anyone write) anthing about where to start in guessing what
join order might be optimal?
--
Joel Burton <[EMAIL PROTECTED]>
er exists in postgresql? (The actuall password verification will be
> taken care of elsewhere... I just need to check if the user exists.)
pg_user holds users
(passwords in pg_shadow)
HTH,
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support
ts. However, these does not seem to be
any way for me to do this from plpgsql, as the functions for manipulating
bytea fields aren't very useful for this, an I can't coerce bytea into
text or anything like that.
Can anyone offer help on this? If I can get into the real args, I'll fix
u
Mello's Cookbook, via techdocs.postgresql.org.
Anyway, here's hoping that someone fixes the dumping problem (emitting as
real constraints would be *much* nicer), but in the meantime, this stuff
may be useful.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
how to disable RI, change an action, etc.
It's at
http://www.ca.postgresql.org/mhonarc/pgsql-docs/archive/pgsql-docs.200012
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Wed, 18 Apr 2001, Tom Lane wrote:
> Joel Burton <[EMAIL PROTECTED]> writes:
> > tgconstrrelid (in pg_trigger) holds table references in a RI trigger.
> > The value in this field is not successfully recreated after a
> > dump/restore.
>
> Yes, this prob
p still
referenced from c
test1=# delete from p;
ERROR: referential integrity violation - key in p still
referenced from c
The problem is that I've use tools that examine tgconstrrelid to figure
reverse engineer which relationships exist.
Is this a bug? A
iod.
I'd like to see it longer -- is there any sane way of doing this with
notice, or, as I fear, would it always be a pain, regardless of how much
advance notice the world rec'd?
Thanks,
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems,
d client programs and such need to be modified?)
I don't think that my tables are incredibly verbose, autogenerated
sequence and index names often push the limit. The problem w/everyone
compiling it at a higher number is that it makes it difficult to
transparently move a PG database from one s
use the command)
psql dbname < dumpfile 2>&1 | grep ERROR
so that I don't miss any errors among the all the NOTICEs
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)
ocbook into useful stuff seems to be
<< than people who can successful compile PG!).
It sounds like the separate-tgz for docs and for Postscript makes perfect
sense. Just make sure that it's *very* obvious where/how to get these, so
that the mailing lists are deluged w/ 'where are the
two- library locations,
and that's it. Worth playing with.
> I hope we will see it in 7.2 ...
Indeed.
For the deep gurus: what's the downside of adding PLs to our PG
server? (Of course, adding alpha- or beta- quality PLs has clear problems,
I mean when this becomes production qual
RC, you can change whether a field can be NULL or not by twiddling a
field in pg_class.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 3: if posting/readi
On Tue, 27 Mar 2001, Tom Lane wrote:
> Joel Burton <[EMAIL PROTECTED]> writes:
> > . add a command like ALTER FUNCTION foo(text) TO foo(text) returns text as
> >
>
> This is on the TODO list already, I believe.
Yikes. I should have read it more carefully. My a
s feasible? I could try my rusty hand at C, but I'd need
someone to give me a 2-paragraph game plan on where to start playing with
the code.
Thanks!
(of course, this raises the same question for VIEWs... dropping and
creating them is a pain b/c of the same reasons...)
--
Joel Burton &l
On Thu, 22 Mar 2001, Tom Lane wrote:
> Joel Burton <[EMAIL PROTECTED]> writes:
> > I rebooted my machine, and it didn't happen again that night. Yesterday,
> > my staff reinstalled Pg straight from the CVS but without (!) tarring up
> > the old Pg install, so I
es of
the Zope scripts (very, very simple: they just call the ZSQL method
'select * from zope_facinst limit 1000')
Sorry I can't provide much more, and, yes, I know it sucks to have a
problem I can't replicate. Err. Computers can be like that.
I hope this helps.
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
ells no lies, and nothing appears in lost+found.
Thanks,
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
e error is Zope *per se*, since Zope can only talk to the
database adapter, and I doubt the database adapter has the intentional
feature of delete-the-file-for-this-table in its protocol. It *could* be a
problem w/ZPoPy or PoPy; I'll send a message to their list as well.
Thanks!
--
Joel B
On Wed, 21 Mar 2001, Hiroshi Inoue wrote:
> Joel Burton wrote:
> >
> > On Wed, 21 Mar 2001, Hiroshi Inoue wrote:
> >
> > > Joel Burton wrote:
> > > >
> > > > Postmaster crashed on me, and on restart, pg_inherits cannot be found.
> >
On Tue, 20 Mar 2001, Tom Lane wrote:
> Joel Burton <[EMAIL PROTECTED]> writes:
> >> and I could find a $PGDATA/base/18720/16567 file.
> >> Could you find such a file ?
>
> > No. I do have the db directory, and all of the other file for the existing
> >
On Wed, 21 Mar 2001, Hiroshi Inoue wrote:
> Joel Burton wrote:
> >
> > Postmaster crashed on me, and on restart, pg_inherits cannot be found.
> > I can see it in pg_class (and it shows up w/ \dS), but any attempt to
> > modify anything fails with "pg_inh
I'm sorry, I should have included:
PostgreSQL 7.1beta4
Linux-Mandrake 7.1 (very simiiar RedHat 7)
Intel hardware
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)--
(w/error
above).
What could this be? Is there any hope?
Thanks!
--
Joel Burton <[EMAIL PROTECTED]>
Director of Information Systems, Support Center of Washington
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an
we don't want to open the door to remote access until we have a
> two-phase transaction commit mechanism in place. Doing it any other way
> is not a 'partial solution', it's a corrupt database waiting to happen.
What does '2-phase transaction commit mechanism
thing like
that. (do we have any unused punctuation? :-) )
* aliases, so that tblFoo in dbA can be called as ToFoo in dbB
* other ways?
The second might be easier from a conversion view: the user wouldn't have
to understand that this was a 'link', but it might prove complicated when
there
cher for even more people. Also, I doubt we'd want
to impugn the perceived quality of 7.1beta b/c people don't
understand that its just the ODBC drivers that out-of-date.)
If there's no one official tasked w/this, I'd be happy to submit my
compiled version, at http://www.sc
000-12-07 14:27:24-08'::timestamp - '24 hours'::timespan
> to:
> '2000-12-07 14:27:24-08'::timestamp
You mean '2000-12-06', don't you?
> Each function should have a marker that explains whether when given a
> const input if the output might
g/advice/additional
tips, I'd appreciate it.)
It should be in today's pgsql-docs listings.
Thanks!
Joel Burton
[EMAIL PROTECTED]
reciate it.)
It should be in today's pgsql-docs listings.
--
Joel Burton, Director of Information Systems -*- [EMAIL PROTECTED]
Support Center of Washington (www.scw.org)
o impossible to even create those, unless you hand
tweaked the system tables), but I think was a view-relies-on-a-
function-relies-on-a-view kind of problem. If I ever see it again, I'll
save it.
Thanks!
--
Joel Burton, Director of Information Systems -*- [EMAIL PROTECTED]
Support Center of Washington (www.scw.org)
AFAICS. Was the database
> still hosed after you stopped both postmasters and started a fresh
> one? (Did you even try that?)
Yes, I stopped both, rebooted machine, restarted postmaster.
Rebooted machine, used just postgres, tried to vacuum, tried to
dump, etc. Always the same story.
--
Joel Burton, Director of Information Systems -*- [EMAIL PROTECTED]
Support Center of Washington (www.scw.org)
80 matches
Mail list logo