nguage Functions" in
the documentation. Here are links to documentation for the latest
version of PostgreSQL:
http://www.postgresql.org/docs/8.0/interactive/trigger-interface.html
http://www.postgresql.org/docs/8.0/interactive/xfunc-c.html
--
Michael Fuhr
http://www.fuhr.org/~mf
a: incorrect data check
"incorrect data check" appears to be a zlib error. Is there any
chance the file got corrupted? Can you duplicate the problem if
you do another dump?
What OS and version of zlib are you using on each server?
--
Michael Fuhr
http
e any problems with doing this? Is a VALIDATOR function
permitted to modify the function it's validating? This wouldn't
work if plpythonu ever installs a VALIDATOR, but you might be able
to use it until such time (barring objections about why it's a Bad
Ide
PostgreSQL":
http://www.powerpostgresql.com/Downloads/annotated_conf_80.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
/8.0/interactive/sql-createlanguage.html
http://www.postgresql.org/docs/8.0/interactive/xplang.html
Note that my idea to use the validator function was just a brainstorm,
not thoroughly tested or thought out. Maybe one of the developers
will comment about the wisdom of (ab)using it the way I suggested.
patch, at least not yet. Just throwing out
an idea that somebody might be able to build on.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
On Mon, Mar 14, 2005 at 08:14:42PM +0100, Marco Colombo wrote:
> On Mon, 14 Mar 2005, Michael Fuhr wrote:
>
> >Would we? My understanding is that code passed to PyRun_String()
> >and friends must be free of line-ending CRs on all platforms, and
> >that the code that
On Tue, Mar 15, 2005 at 01:40:23PM +0100, Marco Colombo wrote:
> On Mon, 14 Mar 2005, Michael Fuhr wrote:
>
> >Hmmm...I think that would be inconsistent with previous reports.
> >For example, in the following message, the poster said that everything
> >(PostgreSQL, pgAdmin
On Tue, Mar 15, 2005 at 06:03:01PM +0100, Marco Colombo wrote:
> On Tue, 15 Mar 2005, Michael Fuhr wrote:
> >I'll postpone commenting on the rest until we find out how the
> >example programs run on Windows. If nobody follows up here then
> >maybe I'll wander over
Does anything else show up in the
web server or database logs?
> but why the "in > ignored" then?
Can you tell us more about the setup? What are all the pieces
involved and their versions?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
d also be interested in seeing what happens if
you run the programs in the following messages:
http://archives.postgresql.org/pgsql-general/2005-01/msg00876.php
http://archives.postgresql.org/pgsql-general/2005-03/msg00630.php
Any test results or comments you can provide
= 123\nreturn x\n'
LANGUAGE plpythonu;
CREATE OR REPLACE FUNCTION test_r() RETURNS integer AS
'x <- 123\nreturn(x)\n'
LANGUAGE plr;
SELECT test_python();
test_python
-
123
(1 row)
SELECT test_r();
test_r
123
(1 row)
--
Michael Fuhr
htt
On Tue, Mar 15, 2005 at 06:03:01PM +0100, Marco Colombo wrote:
> On Tue, 15 Mar 2005, Michael Fuhr wrote:
>
> >I'll postpone commenting on the rest until we find out how the
> >example programs run on Windows. If nobody follows up here then
> >maybe I'
On Tue, Mar 15, 2005 at 10:46:09PM +, Paul Moore wrote:
> The long and short of it is that I believe you just use \n to delimit
> lines on Windows, just like anywhere else.
Many thanks -- your test results contain the info we've been seeking.
--
Michael Fuhr
http://www.fuhr
fferent line endings on different platforms. That would
mean the programmer couldn't simply do this:
PyRun_SimpleString("x = 1\n"
"print x\n");
Instead, the programmer would have to do a compile-time or run-time
check and build the
Did you restart the database after making the configuration changes?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PR
Does C runtime support in Windows convert
> \n into \r\n automatically in printf()? If so, I'm on the wrong track.
> It may do the same with scanf() and other stdio functions.
I think that's exactly what happens with I/O streams in "text mode."
--
Michael Fuhr
http
if (*sp == '\n')
{
*mp++ = *sp++;
*mp++ = '\t';
}
else
*mp++ = *sp++;
}
*mp++ = '\n';
*mp++ = '\n';
*mp = '\0';
How about them apples? The PL/Python handler is alre
OW to verify that the variables are indeed set? As
Tom Lane suggested, if you're on a *nix system, did you use "ps"
to see if the stats buffer process and stats collector process are
running? (I'm not sure how to check that if you're on Windows.)
Have you looked for errors
, users_id) VALUES (bdid, NEW.uid);
RETURN NULL;
END;
' LANGUAGE plpgsql VOLATILE;
See the "Trigger Procedures" section of the PL/pgSQL chapter in the
documentation to learn more about NEW (and OLD, TG_ARGV, etc.), and
see the "Sequence Manipulation Functions&
t is slow to use GUID as varchar...
What is "it" and why do you think that "it" is slow? What problem
are you trying to solve?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
o send the right thing.
That doesn't address the indentation munging, though. That appears
to be a matter of knowing whether you're inside a quote or not when
a LF appears.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
On Thu, Mar 17, 2005 at 09:48:51PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > Line-ending CRs stripped, even inside quotes; mid-line CRs converted
> > to LF. Tests done with Python 2.4 on FreeBSD 4.11-STABLE; I wonder
> > what
On Fri, Mar 18, 2005 at 12:35:07AM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > then concerns about CR conversions potentially messing up a user's
> > strings might be unfounded.
>
> Yeah, it looks like you are right:
>
> http:/
iming at removing the
> need for extra indentation.
Sounds good too, if that'll work. Looking forward to seeing what
you find out.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
On Fri, Mar 18, 2005 at 10:33:01AM -0500, Tom Lane wrote:
>
> I think it would be reasonable to back-patch a small fix to convert CRLF.
> The sort of rewrite Marco is considering, I wouldn't back-patch.
I just submitted a small patch to convert CRLF => LF, CR => LF.
-
before triggers firing
after it.
An operation ain't over 'til it's over: if an after trigger doesn't
like what it sees, it can still abort the operation by raising an
exception. That doesn't defeat the purpose -- it's part of the
purpose.
--
Michael Fuhr
http://www.f
#x27;t (unless I've overlooked
it in the SQL:2003 draft).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
.0.1.22 > 127.0.0.1.3767: P 5104:5192(88) ack 3688 win 57344
Only the last case, a PostgreSQL connection over a compressed SSH
tunnel, showed any compression in the response.
It looks like OpenSSL supports compression but the application has
to enable it:
http://www.openssl.org/docs/ss
unction to avoid passing
the data back and forth between the client and the server? Are you
familiar with constructs like CREATE TABLE AS and INSERT...SELECT?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner
nd 1?
Actual bits, so manipulating the data in C should be the same for
both types. Bit strings take an extra 4 bytes of storage, but if
that doesn't matter then you might want to consider which type would
be easier to manipulate in SQL (bytea functions vs. bit string
functions).
stgreSQL 8.0).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
448 in ExecAgg (node=0x839d188) at nodeAgg.c:674
Line 583 in mcxt.c is:
(*header->context->methods->free_p) (header->context, pointer);
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/rea
tations with constraints like foreign keys.
> Also, in my original schema I'm getting an increment of 2 every time I
> run nextval. I can't duplicate this yet but I'm looking into it.
> Possibly my error somewhere in the function.
Could be one of the "gotchas"
M ONLY in the inheritance
> statement?
What are you trying to do that a simple INHERITS won't do?
> What does GUC stand for? ;)
Grand Unified Configuration.
http://www.postgresql.org/docs/8.0/static/runtime-config.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
--
currency Control (MVCC) so readers and writers
don't block each other?
http://www.postgresql.org/docs/8.0/static/mvcc.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 2: you can get off all lists at once with the u
r
pg_shadow | r
pg_tablespace | r
pg_toast_1260 | t
pg_toast_1261 | t
pg_toast_1262 | t
pg_xactlock | s
(8 rows)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send a
t.
What's your log_min_messages setting? According to the documentation,
debug_print_* needs DEBUG1 or lower.
http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME-CONFIG-LOGGING-WHAT
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
n a single ALTER TABLE ALTER CONSTRAINT would be, but
it's less hackish than updating the system catalogs directly. Or
am I missing something?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore you
)
> indexrelname (name)
indexrelid = object ID (oid) of the index
indexrelname = name of the index
See the "Indexes" chapter in the documentation for more information
about indexes.
http://www.postgresql.org/docs/8.0/static/indexes.html
Studying the "System Catalogs" chapter mi
payway_profile AS pp
JOIN location AS la ON (pp.location_a = la.location_id)
JOIN location AS lb ON (pp.location_b = lb.location_id);
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please se
STYPE = "_int4",
> > FINALFUNC = "property"."ag_pos_avg_final", INITCOND = "'{0,0}'");
>
> Too many quotes ... try INITCOND = '{0,0}'
Also, check the array subscripts in your functions. By default,
PostgreSQL array subscripts start a
se,
etc.). See for example DBI-link:
http://pgfoundry.org/projects/dbi-link
With views and rules you might be able to implement update/delete
operations as well, although you wouldn't get transaction semantics.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
arch/V2/
Is there a reason you're using PostgreSQL 7.3 instead of upgrading
to a newer release?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
VALUES (20);
SELECT x FROM foo WHERE x < now()::abstime::integer;
x
10
(1 row)
ANALYZE foo;
SELECT x FROM foo WHERE x < now()::abstime::integer;
ERROR: unsupported type: 23
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
On Sat, Mar 26, 2005 at 10:24:06AM -0700, Michael Fuhr wrote:
>
> SELECT x FROM foo WHERE x < now()::abstime::integer;
> ERROR: unsupported type: 23
\set VERBOSITY verbose
SELECT x FROM foo WHERE x < now()::abstime::integer;
ERROR: XX000: unsupported ty
re a reason you're using integer instead of timestamp or
timestamp with time zone?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
ent implementation supports only
exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro
might be working on shared row-level locks for a future release.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
t-level trigger
or an AFTER row-level trigger is always ignored; it may as well
be null.
http://www.postgresql.org/docs/8.0/interactive/triggers.html
http://www.postgresql.org/docs/8.0/interactive/plpgsql-trigger.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
-
On Fri, Mar 18, 2005 at 10:12:05PM -0700, Michael Fuhr wrote:
>
> I just submitted a small patch to convert CRLF => LF, CR => LF.
This patch is in 8.0.2beta1, so PL/Python users might want to test
it before 8.0.2 is released. See the recent "8.0.2 Beta Available&quo
angement avoids problems on platforms that have
file size limitations.
http://www.postgresql.org/docs/8.0/interactive/storage.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 8: explain analyze is your friend
2. Unless my memory fails me, it died trying to load the data into
> the table.
The 7.2 source code appears to have this logic; I don't know if
there are any problems with it. "It died" doesn't mean much --
a load could have failed for a number of reasons, so without
the e
O OFF is no longer supported
Server-side autocommit was removed in 7.4 so now it's just a
client-side behavior. In psql you can use "\set AUTOCOMMIT off";
otherwise see the documentation for your client interface.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---
datfrozenxid
FROM pg_database
ORDER BY datname, oid;
--
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])
xists, so he gets a duplicate key error.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
mess
he problem before guessing how to fix it.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
t; somebody help me?
>
> Unfortunately we haven't prepared release notes yet.
For the gory details, you could search for "REL8_0_STABLE" in the
pgsql-committers archives for the last few months.
http://archives.postgresql.org/
--
Michael Fuhr
http://www
x27;',''||quote_literal(RECORDNAME.column2)||'')'';
One of the operands to || is probably NULL, so the entire INSERT
string ends up being NULL. Example:
SELECT 'abc' || 'def';
?column?
--
abcdef
(1 row)
S
On Wed, Mar 30, 2005 at 10:59:52PM +0200, [EMAIL PROTECTED] wrote:
> On Sun, Mar 27, 2005 at 01:37:44AM -0700, Michael Fuhr wrote:
> > The current implementation supports only
> > exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro
> > might be working on shared
ELECT foo();
foo
-
{1,2,3}
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
tors" chapter of the documentation.
Here's a link to the latest version:
http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)-
Selecting multiple columns into an array doesn't work in SQL or
PL/pgSQL -- that could cause problems in the general case because
columns might have different types and arrays contain elements of
the same type. However, some other languages' interfaces to
PostgreSQL can re
--+-
parent | 1
child | 2
(2 rows)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
aybe somebody can explain what's wrong.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
ions if
we knew the "what" rather than focusing on a particular "how."
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
ot; chapter in the documentation for more info.
http://www.postgresql.org/docs/8.0/interactive/runtime-config.html#GUC-ADD-MISSING-FROM
There's been a proposal to disable add_missing_from by default in
a future version of PostgreSQL.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
--
= 'fruit'::regtype;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message c
hen you can use TRUNCATE
or DELETE to empty it, then INSERT ... SELECT to insert the results
of a query. Another possibility would be to DROP the table and use
CREATE TABLE AS or SELECT INTO, but then you'd have to recreate any
indexes, constraints, triggers, etc.
--
Michael
On Mon, Apr 04, 2005 at 11:18:08AM +0400, go wrote:
>
> Tell me please is there any way to dump data from current session
> (instead of using pg_dump) ?
What exactly are you trying to do? Will COPY (or psql's \copy) do
what you want?
--
Michael Fuhr
http://www.f
in a procedural language like
PL/Perl, PL/Python, or PL/Tcl that runs pg_dump, but why do you
need to do this from SQL? Why can't you just run pg_dump from
outside the database?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
L? Why can't you just run pg_dump from
> MF> outside the database?
>
> Pls, write a small sample of the function .
Could you tell us why you want to run pg_dump from SQL? What problem
are you trying to solve?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
elation_size() correctly showed
the on-disk size of the file that stores the index. Are you expecting
something different? Or have you found a case where relation_size()
returns the wrong value?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
, compiled by GCC gcc (GCC) 3.4.2
(1 row)
test=> SELECT relation_size('pg_am_oid_index');
relation_size
---
16384
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Tue, Apr 05, 2005 at 01:43:56PM -0400, Joseph Shraibman wrote:
>
> Can I take the new .c file, do a make install, and have it work in 7.4.7 ?
Not unmodified, since it uses features new to 8.0 (e.g., tablespaces).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(
(AF_UNIX) sockets
if your system does. They still use the socket interface, but
they're typically faster than a TCP connection.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
orks:
http://www.postgresql.org/docs/7.4/interactive/queries-union.html
"Furthermore, it eliminates all duplicate rows, in the sense of
DISTINCT, unless UNION ALL is used."
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
l that function instead
of using the / operator. I'd avoid any temptation to change the
behavior of the operator itself because that could cause problems
in other code that isn't expecting it.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)-
= $rv->{rows}[$rn];
push @$res, {item_id => $row->{item_id},
description => $row->{item_descr},
order_date => $row->{start_date}};
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)-
ails, especially section 4.2 SMTP Replies and section 4.3
Sequencing of Commands and Replies:
ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searche
this error:
>
> ERROR: wrong # args: should be "set varName ?newValue?"
You're mixing languages: you're using the SQL concatenation operator
(||) in a Tcl function. See a Tcl reference for the details of Tcl
syntax. The following should work:
set var "SENDING EMAIL
ents.
Please post an example of what you're doing: a simple function, how
you're invoking it, and the error message(s).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
ive/history.html
According to "The design of POSTGRES" by Stonebreaker and Rowe,
POSTGRES means "POST inGRES" (the successor to INGRES). Various
other sources say that INGRES means "INteractive Graphics (and)
REtrieval System."
--
Michael Fuhr
http://www.fuhr.o
hem in
7.3.9, 7.4.7, 8.0.2, or 8.1devel. What's different about your 7.4
installation?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
On Tue, Apr 19, 2005 at 12:39:52PM -0400, Alvaro Herrera wrote:
> On Tue, Apr 19, 2005 at 10:03:45AM -0600, Michael Fuhr wrote:
> > On Tue, Apr 19, 2005 at 11:17:46AM -0500, Don Isgitt wrote:
> > >
> > > Thanks, Tom. Interestingly enough, neither my original query o
doing it under the hood. If you're logging
queries then you should be able to figure out where this is happening
in the application.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 3: if posting/reading through
';
?column?
--
f
(1 row)
SELECT 'test[* string' ~ '***=test[*';
?column?
--
t
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
akes a zone-less time stamp and interprets it as
UTC time to produce a UTC time stamp, which is then rotated to PDT
(UTC-7) for display.
Perhaps this is what you want:
SELECT timezone('UTC', timeofday()::timestamptz);
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
--
ting it to timestamptz puts it in your local time
zone:
SELECT '2005-04-21 23:25:12.868212'::timestamptz;
timestamptz
---
2005-04-21 23:25:12.868212-07
(1 row)
--
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])
test=> INSERT INTO test (c1) VALUES ('Test');
NOTICE: Test
INSERT 0 1
Hope this helps.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
21 15:00:00-07', 'PST8PDT') AS pacific,
tzconvert('2005-04-21 15:00:00-07', 'UTC') AS utc;
pacific | utc
----+
2005-04-21 15:00:00-07 | 2005-04-21 22:00:00+00
(1 row)
Maybe somebody knows of an easier way to do that.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
ons: so that a mistake doesn't leave me with half-done work
(any error will cause the entire transaction to roll back), and to
make the changes atomic for the benefit of other transactions.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)--
7;) in lower('aBcDeF'));
position
--
0
(1 row)
You might also want to look at the contrib/pg_trgm module to see
if it would be useful.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
resql.org/docs/8.0/interactive/catalogs.html
http://www.postgresql.org/docs/8.0/interactive/information-schema.html
One way to learn more about the system catalogs is to run "psql -E"
or execute "\set ECHO_HIDDEN" from within psql so you can see the
queries psql sends for commands like
s back, then nobody else
will ever have seen the changes; if it commits then the changes all
become visible at the same time.
Try it and see what happens. You might see blocking and you might
be able to cause deadlock, but you shouldn't ever see some changes
but not
On Fri, Apr 22, 2005 at 03:31:59AM +0100, Carlos Correia wrote:
> Michael Fuhr wrote:
> | On Fri, Apr 22, 2005 at 01:44:24AM +0100, Carlos Correia wrote:
> |
> |>carlos=# insert into test (c1) values( 'test');
> |>ERROR: NEW used in query that is not in a rule
a lock that
conflicts with T1's lock on foo. Both transactions are waiting for
the other to release a lock, so we get deadlock.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
E ONLY cases
ADD CONSTRAINT cases_pkey PRIMARY KEY (id);
Presumably that's because adding the primary key constraint after
populating the table is more efficient than populating the table
with the constraint (and the associated index) in place.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
-
"psql -f filename" or, if your shell supports redirection,
"psql < filename". See the psql documentation for details:
http://www.postgresql.org/docs/8.0/interactive/app-psql.html
If that's not what you're looking for, then please provide more
informatio
21 22:00:00+00
>
> Doesn't "at time zone" do what you need ?
Not as far as I can tell, because if the result is timestamp with
time zone then it's rotated to the local time zone for display. If
you can post a counterexample then I'd b
SET
show time zone;
TimeZone
--
02:00:00
(1 row)
insert into test (f) values (now());
INSERT 0 1
SELECT * from test;
f
--
2005-04-25 00:28:33.34721+02
(1 row)
select f, f::timestamp at time zone
101 - 200 of 1313 matches
Mail list logo