Trigger functions need to take no arguments and return
opaque. You can use NEW or OLD inside the function and
arguments given in the create trigger statement
are passed into the function in a special way (in
plpgsql, it's TG_ARGV[] i believe)
On Fri, 9 Mar 2001, De Leeuw Guy wrote:
> Hi all,
>
Well, TOAST should be fairly transparent to users I believe. TOAST
values should be compressed or stored separately from the rest of
the row's data to get around the 8-32k block size.
There's also the large object support which is something else entirely.
On Fri, 9 Mar 2001, Lee Russell wrote:
I can make this happen consistently with Perl DBI by placing a
$dbh->disconnect() in the DESTROY subroutine of an object. I doubt the two
issues have much in common, but there's my $.02. You might post to the list
(not me, I'm ignorant) how you managed to make this happen.
--rob
- Original
here is the table:
Table "testx"
Attribute | Type | Modifier
---+-+
starter | integer | not null
second| text| default timestamp('now')
I am trying to make a rule which states:
"Scott Price" <[EMAIL PROTECTED]> writes:
> The last response I saw =
> from postgresql.org to Frank was from a fellow Tom Lane asking to see a =
> core dump. Since I experienced this problem I would like to send you a =
> core dump of my file (which is gzipped), core.gz
No, I wanted to see a ba
On Tue, Mar 06, 2001 at 10:38:43AM -0500, Michael Fork wrote:
> try starting psql with the -E option -- this displays all queries used
> internally to the screen, i.e.:
Sorry, hadn't read this one before posting... Thanks to the "moderating" it'll
all be out of synch anyway but..
Patrick
--
tc lewis <[EMAIL PROTECTED]> writes:
> when configuring and installing postgresql, is there any way to specify
> where pgsql/the postmaster will put its socket file (.s.PGSQL.)?
Possible in 7.1, but not in earlier releases. Note that moving around
the socket file is likely to create compatib
To: Tom Lane, and Postgresql.org staff,
This is a message in response to the one sent by Frank Miles on Tue 7 Nov 2000
11:11:29 -0800 (PST).
I have been experiencing the same problem as the gentleman, Frank Miles, when running
Postgre SQL. I have been repeatedly getting "pqReadData - backend
hi,
I an using postgresql-7.1beta4 and am trying to use the large text fields.
I have heard of TOAST. There is little documentation.
I found one section about creating a data type,
then creating two functions to convert the data types.
Is this how TOAST is implemented?
Am I on the right trac
Tom believes there may be a memory leak, which would be causing the
(strangely enough) memory problem. Didn't think about reducing the import
size. What I might try in that case would be to re-connect to the db
periodically, rather than splitting the file. The problem becomes
unmanageable afte
when configuring and installing postgresql, is there any way to specify
where pgsql/the postmaster will put its socket file (.s.PGSQL.)? it
seems to always put it in /tmp. i can't seem to find a tmpdir option or
anything similar to use as a configure option. anything?
-tcl.
---
I need to determine the users time in another Time Zone for the time
now().
I tried to manually add or subtract the difference of hours between the
server timezone and the other timezone, but I have to do it for _Every_
timezone. Not only that, but I need to take Daylight Saving Time (DST)
into a
Hi all,
I try this :
CREATE FUNCTION DelArtFather(INT4)
RETURNS INT4
AS '
DELETE FROM TArticles WHERE IdArtFather = $1;
SELECT 1 AS ignore_this
'
LANGUAGE 'sql';
CREATE TRIGGER trigger_TArticles
BEFORE DELETE ON TArticles
FOR EACH ROW EXECUTE PROCEDURE DelArtFather(old.IdArt);
and i
In article <[EMAIL PROTECTED]>,
"Creager, Robert S" <[EMAIL PROTECTED]> wrote:
> I think this is a question regarding the backend, but...
[snip]
> (COPY u FROM stdin). The backend process which handles the db connection
> decides that it needs a whole lot of memory, although in a nice
> control
is there any integer constant for infinity in postgres? i know such
beasts exist (with some bugs) in the date/time domain. it would be nice
to have an abstraction for numerology as well as chronology...
-tfo
---(end of broadcast)---
TIP 1: subsc
Hello! I've got a question:
I'm trying to create a system with a string (varchar) primary key which
is *not* case sensitive. Is there any way I can create a primary key
column which automatically takes care of this?
I'm coming at this problem from a java app server, so my hands are
somewhat
Bruce Momjian <[EMAIL PROTECTED]> writes:
> There is no user-visible mapping, though the number is the process id.
> You could use that. I think you can get the backend process id somehow,
> but I am not sure how. Anyone?
If you're using libpq, there is a function to retrieve the backend's PID
[EMAIL PROTECTED] wrote:
>
> I think I have been using -F option since
> but now I'm not sure. I either start
> with pg_ctl or postmaster directly. In any case
> man pages suggest that if you can pass optional parameters
> to postgres via -o switch from postmaster. I would
> think that if I do
> Thanx Bruce
>
> What I found is something like pg_temp.25865.0. Do we have some kind of
> mapping table between the "real temp table name" and pg_temp*. If there
> are more than one temp tables, I need a way to differentiate them.
>
> Thanks for your help
There is no user-visible mapping,
[EMAIL PROTECTED] writes:
> Any thoughts what may have casued this?
Not from that amount of data. Are there any core-dump files laying
about?
regards, tom lane
---(end of broadcast)---
TIP 1: subscribe and unsubscribe comm
I've applied a patch for this problem to current sources. The
improvement was more than I expected --- a test case involving
deleting 8 tuples from a foreign-key-referencing table dropped
from ~15min to ~8sec. Insertion of a large number of tuples in one
transaction sped up quite a bit too.
> Is there a way to automatically restart postgres after a failure 8)
/etc/inittab ?
--
ÌĤ¯Ç¤ÏÁͤòÊá¤é¤Ì
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Bruce Momjian wrote:
> [ Charset ISO-8859-1 unsupported, converting... ]
> >
> > I was trying to check my temp table structure, but failed (7.1 beta4)
> > and I found the following item in the TODO list (without '-').
> >
> > * allow psql \d to show temporary table structure
> >
> > Is there any
[ Charset ISO-8859-1 unsupported, converting... ]
>
> I was trying to check my temp table structure, but failed (7.1 beta4)
> and I found the following item in the TODO list (without '-').
>
> * allow psql \d to show temporary table structure
>
> Is there any workaround or equivalent SQL avail
I think I have been using -F option since
but now I'm not sure. I either start
with pg_ctl or postmaster directly. In any case
man pages suggest that if you can pass optional parameters
to postgres via -o switch from postmaster. I would
think that if I do it correctly such options will
show up
Hi,
Suppose:
create table rawrecords (
myrec text;
);
create table cookedrecords (
id varchar(10) not null,
name varchar(20) not null,
value integer not null
);
We insert a record say string: "thisid/thisname/12345" into the
rawrecords table.
I would like to have a trigge
I could not easily find answers to these simple questions.
a) Does VACUUMing ( with ANALYSE ) in effect perform a file consistency
check on the database structure as a side effect?
b) Is it ok to VACUUM while the database is alive and active?
c) Can I backup via pg_dump while the database is
If the file is truly CSV (comma separated values), you might want to change
DELIMITERS '\t' to DELIMITERS ','... Otherwise, include a couple of lines
of data...
Robert Creager
Senior Software Engineer
Client Server Library
303.673.2365 V
303.661.5379 F
888.912.4458 P
StorageTek
INFORMATION made
> "bk" == Boulat Khakimov <[EMAIL PROTECTED]> writes:
bk> How do I grant permissions on everything in the selected
bk> databes?
bk> GRANT doesnt take as on object database name nor does it
bk> accept wild chars
Attached is some Perl code I wrote long ago to do this. Thi
On Tue, Mar 06, 2001 at 04:37:32PM +0100, Karel Zak allegedly wrote:
> On Tue, Mar 06, 2001 at 10:19:13AM -0500, Boulat Khakimov wrote:
> >
> > Karel Zak wrote:
> > > > On Tue, Mar 06, 2001 at 09:14:54AM -0500, Boulat Khakimov wrote:
> > > > Tom Lane wrote:
> > > > >
> > > > > Boulat Khakimov <[E
Francis Solomon wrote:
>
> Hi Boulat,
>
> stasis=# select (now() + '1 year')::date;
> ?column?
>
> 2002-03-06
> (1 row)
>
> Hope this helps
>
> Francis
>
> > Hi,
> >
> > Im a little bit stuck here.
> >
> > Does anyone know how to get date in format '-MM-DD' of a date one
>
On Tue, Mar 06, 2001 at 06:44:31PM -0500, Boulat Khakimov allegedly wrote:
> testdb=# select encode('bob','bob');
> ERROR: Load of file /home/boulat/Funio.com/database/encode.so failed:
> /home/boulat/Funio.com/database/encode.so: undefined symbol:
> BF_cfb64_encrypt
>
> thats the function that
you can say:
(now() + '1year'::timespan)::date
Jie LIANG
St. Bernard Software
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.stbernard.com
www.ipinc.com
On Tue, 6 Mar 2001, Boulat Khakimov wrote:
> Hi,
>
> Im a little bit stuck here.
On Fri, 9 Mar 2001, Tim Frank wrote:
> I apologise if this has been posted/asked already, but since it has been
> about a week and it hasn't been "fixed" I needed to ask. Every time I
> issue a search at http://www.postgresql.org/search.mpl even on the
> easiest of search items, such as "p
I get the followig error although TK is installed
-start
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/mnt/hdb/src/postgresql-7.0.3/src/bin/pgaccess'
make[2]: Entering directory `/mnt/hdb/src/postgresql-7.0.3/src/bin/pgtclsh'
gcc -I../../include -I../../backe
Bill Huff <[EMAIL PROTECTED]> writes:
> There is a foreign key constraint, but that is accomplished by an
> INSERT/UPDATE trigger. I don't see why that should cause any problems.
Ah, I believe I see the problem: it's the inefficient implementation of
AFTER EVENT triggers. The existence of e
Add ON DELETE CASCADE to the references in book.
On Mon, 12 Mar 2001, Marcelo Pereira wrote:
> Hi,
>
> I am in trouble deleting rows in cascade.
>
> I have a scheme like this:
>
> create table author (author_cod integer primary key, author_name char(20));
> create table book (book_cod intege
As an outside chance, does the table in question have any constraints
defined on it?
On Mon, 12 Mar 2001, Bill Huff wrote:
> I am having some performance issues with deletion.
>
> It appears that in deleting records from a table with a significant
> number or rows ( in this case 1.3 mill
There is a foreign key constraint, but that is accomplished by an
INSERT/UPDATE trigger. I don't see why that should cause any problems.
--
Bill
On Mon, Mar 12, 2001 at 08:27:51AM -0800, Stephan Szabo wrote:
>
> As an outside chance, does the table in question have any constraints
> defin
Instead of sending old.ldArt in as a parameter, try just referencing old
inside the function body.
So the function then has no argument.
Mark
"De Leeuw Guy" <[EMAIL PROTECTED]> wrote in message
98imbv$2hk2$[EMAIL PROTECTED]">news:98imbv$2hk2$[EMAIL PROTECTED]...
> Hi all,
>
> I try this :
>
>
Sorry!!
It works very well!
Renaud THONNART
> Renaud Tthonnart <[EMAIL PROTECTED]> writes:
> > I would like to know how I can get the number of elements of an array.
>
> There is a function that returns an array's dimensions as a text string:
>
> regression=# select array_dims( '{1,2,3}'::int[
Tom Lane wrote:
> Renaud Tthonnart <[EMAIL PROTECTED]> writes:
> > I would like to know how I can get the number of elements of an array.
>
> There is a function that returns an array's dimensions as a text string:
>
> regression=# select array_dims( '{1,2,3}'::int[] );
> array_dims
> --
On Mon, Mar 12, 2001 at 12:07:13PM -0300, Marcelo Pereira wrote:
> Hi,
>
> I am in trouble deleting rows in cascade.
>
> I have a scheme like this:
>
> create table author (author_cod integer primary key, author_name char(20));
> create table book (book_cod integer primary key, book_autor integ
Bill Huff <[EMAIL PROTECTED]> writes:
> It appears that in deleting records from a table with a significant
> number or rows ( in this case 1.3 million ) it takes about 1 hour per
> 100K rows deleted if deleting more then 400K at a time. This sounds
> way to slow to me.
Me too. What PG
Hi,
I am in trouble deleting rows in
cascade.
I have a scheme like this:
create table author (author_cod integer primary
key, author_name char(20));
create table book (book_cod integer primary key,
book_autor integer references author(author_cod),
book_title char(30));
I would like
I have not been following the start of this thread but I was myself
wondering about the security of DB access over the web
I have been playing with JSP and servlets with JDBC access to PG
(I guess the principal is the same as using other scripting languages.)
I noticed that it appears impossible
On Sun, Mar 11, 2001 at 08:48:21PM -0500, Tom Lane wrote:
[ . . . ]
> bytea is probably your best bet. The 8k limit is toast in 7.1, btw.
Is that whay you named it TOAST, in order to be able to say that? :)))
Regards, Frank
---(end of broadcast)-
47 matches
Mail list logo