Hi Nageshwar try this command i think it's what you
need.
psql -t -d DataBaseName -c "select tablename
from pg_tables where schemaname='theSchemaName' " | xargs -i psql -t -d
DataBaseName -c "grant select on {} to nabifadel"
Najib.
Programmer at Saint-Joseph University
Lebanon
-
Jamie Deppeler wrote:
UPDATE wip.resource
set "name" = datarecord.borname
where wip.resource."primary" = OLD."primary";
get the following error
Error: record "old" is not yet assigned
If called from an INSERT then OLD is undefined, since there is no old
version of the row.
--
Richar
On Wed, Dec 01, 2004 at 02:02:41AM -0600, Bruno Wolff III wrote:
> On Mon, Nov 29, 2004 at 12:49:46 +,
> Chris Green <[EMAIL PROTECTED]> wrote:
> >
> > This is a perpetual problem, if people all used the same MUA and
> > (assuming it has the capability) all used the 'reply to list' command
>
Tom Lane wrote:
Jan Wieck <[EMAIL PROTECTED]> writes:
Oh my,
after reading this he really caught my attention. You have to google for
"Gary Burnore" a little. This guy has a record ...
gburnore was known far and wide as a net.asshole when I dropped out of
Usenet, lo these many years ago. Doesn'
Hello,
for applications which require offline data collection/processing with PDAs
and synchronisation/replication with a centralised server database (running
on PostgreSQL), I was wondering whether it would be possible to set up an
equivalent to *duck* Sybase SQL Anwhere using free software, m
Hi!
I am using PostgreSQL with a proprietary ERP software in Brazil. The
database have around 1.600 tables (each one with +/- 50 columns).
My problem now is the time that takes to restore a dump. My customer
database have arount 500mb (on the disk, not the dump file) and I am
making the dump wit
Please excuse my ignorance of databases and black holes.
I don't have access to a Postgres db right now so I tried an
experiment with mysql. Since they don't have a "select into" that
creates a table, I tried this:
mysql> create table t as ( select * from table_x);
since table_x has no rows,
I am glad to hear that someone else is thinking along these lines , I am
working on a project that uses PDA's with Differential GPS as field
survey units, and I would like to be able to do more than simply dump
the collected data and then append it to a Postgresql DB at home base,
as we are loo
On Wednesday 01 December 2004 04:43 am, Wolfgang Keller wrote:
> Hello,
>
> for applications which require offline data collection/processing with PDAs
> and synchronisation/replication with a centralised server database (running
> on PostgreSQL), I was wondering whether it would be possible to set
On Wednesday 01 Dec 2004 4:46 pm, Rodrigo Carvalhaes wrote:
> I need to find a solution for this because I am convincing customers
> that are using SQL Server, DB2 and Oracle to change to PostgreSQL but
> this customers have databases of 5GB!!! I am thinking that even with a
> better server, the re
On Wed, Dec 01, 2004 at 09:33:18 +,
Chris Green <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 01, 2004 at 02:02:41AM -0600, Bruno Wolff III wrote:
> > On Mon, Nov 29, 2004 at 12:49:46 +,
> > Chris Green <[EMAIL PROTECTED]> wrote:
> > >
> > > This is a perpetual problem, if people all used t
Larry White <[EMAIL PROTECTED]> writes:
> mysql> create table t as ( select * from table_x);
That works in Postgres too. The SELECT INTO construct is a bit broken
since, as you discovered, it has a different meaning in plpgsql than
in the main SQL language. So I recommend using CREATE TABLE AS w
--- Shridhar Daithankar <__> wrote:
> On Wednesday 01 Dec 2004 4:46 pm, Rodrigo Carvalhaes wrote:
> > I need to find a solution for this because I am convincing
> customers
> > that are using SQL Server, DB2 and Oracle to change to PostgreSQL
> but
> > this customers have databases of 5GB!!! I am
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> It is also possible for mailing list software to handle this
> preference for you (by not sending copies to addresses on the list
> that appear in the recipient headers), but I don't know if the
> software in use has that capability.
That's a good poin
Shridhar Daithankar <[EMAIL PROTECTED]> writes:
> On Wednesday 01 Dec 2004 4:46 pm, Rodrigo Carvalhaes wrote:
>> I need to find a solution for this because I am convincing customers
>> that are using SQL Server, DB2 and Oracle to change to PostgreSQL but
>> this customers have databases of 5GB!!! I
I am trying to create a trigger that needs to capture the primary key
value out of NEW variable.
However the trigger can be called from 2 different tables whose PKs are
Table1id
Table2id
Is possible to declare a variable to build the column name
Tableid varchar(20) := TG_RELNAME || ''id'';
And
On 11/30/2004 11:46 PM, Marc G. Fournier wrote:
On Tue, 30 Nov 2004, Jan Wieck wrote:
On 11/30/2004 2:37 PM, Gary L. Burnore wrote:
Perhaps I wasn't clear. I don't care WHO you are. I've already asked you
once to stay out of my email. Further emails from you will be reported to
both Yahoo and C
George Woodring wrote:
Is possible to declare a variable to build the column name
Tableid varchar(20) := TG_RELNAME || ''id'';
And then use this variable to get the PK value?
Tableidvalue int4 := NEW.tableid;
No. You can build a dynamic query via EXECUTE, but that can't access
NEW/OLD.
--
Richa
Richard Huxton wrote:
George Woodring wrote:
Is possible to declare a variable to build the column name
Tableid varchar(20) := TG_RELNAME || ''id'';
And then use this variable to get the PK value?
Tableidvalue int4 := NEW.tableid;
No. You can build a dynamic query via EXECUTE, but that can't acces
Using perl DBI I recently read that if autocommit is turned on, it does a
commit after every transaction. I wanted to confirm if this also applies to
select statements.
When I'm loading data, I need to do a select before inserting a new row and
I don't want to commit after the select because it'
I want to ensure data integrity when inserting into a table, preventing
multiple
entries of identical rows of data.
Does this call for using a trigger?
How would triggers perform a query to test if data already exists in
the table?
(The doco outlines how triggers perform tests on NEW data inser
From: "Scott Frankel" <[EMAIL PROTECTED]>
>
> I want to ensure data integrity when inserting into a table, preventing
> multiple
> entries of identical rows of data.
>
> sample table:
>
> CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text);
sounds like a job for a UNIQUE constrain
Scott Frankel wrote:
I want to ensure data integrity when inserting into a table, preventing
multiple
entries of identical rows of data.
Just use a unique index on the columns you want to make sure are not
duplicated.
Does this call for using a trigger?
How would triggers perform a query to test
CREATE UNIQUE INDEX uidx_thename ON names(the_name);
Should prevent duplicates.
Ian Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
[EMAIL PROTECTED]
Phone: (253) 798-3549
Pager: (253) 754-0002
>>> Scott Frankel <[EMAIL PROTECTED]> 12/01/04 10:11 AM >>>
I want to ensure dat
Am 2004-12-01 10:45:51, schrieb Joel:
> Suggested questions:
>
> (1) If there were a USENET newsfeed, under comp.databases.postgresql.*,
> of one or more of the current postgresql mailing lists, I would
> (c) use the mailing lists primarily,
> (2) If there were a separate USENET comp.databa
1.
CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text);
CREATE UNIQUE INDEX uidx_thename ON names(the_name);
vs.
2.
CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text UNIQUE);
Is the UNIQUE constraint in the second solution merely short-hand for
the explicit
index decla
From: "Sally Sally" <[EMAIL PROTECTED]>
> Using perl DBI I recently read that if autocommit is turned on, it does a
> commit after every transaction. I wanted to confirm if this also applies
to
> select statements.
in fact, it wraps every statement that is not aleady in a transaction,
into one.
Hi.
If I try createlang plperl I get:
[EMAIL PROTECTED]:~$ /usr/local/pgsql/bin/createlang plperl shop
createlang: language installation failed: ERROR: could not access file
"$libdir/plperl": No such file or directory
Checking my build dirs I find that no plperl.so has been build
(--with-perl
I'm trying to do some research and reporting for an email application
by domain name. This has led to a confounding attempt to do any of the
legwork in SQL via postgres.
Here is my foundational query:
SELECT DISTINCT split_part( u.email, '@', 2 )
FROM user AS u, message AS m
WHERE u.id = m.use
Hi
I have a user table in which number of users are created in a database rather
creating postgresql user. We are having only one database user, through which
we connect database.
I have make a simple table into database and fire a triggers on add, edit and
delete data alongwith userid and act
Hi,
Just trying 7.4.5 and bumped into a problem.
consider following code:
CREATE OR REPLACE FUNCTION rowcount_test() RETURNS bigint AS '
DECLARE
base_hits bigint;
BEGIN
CREATE TEMP TABLE ltbl_temp AS SELECT 1 AS data;
GET DIAGNOSTICS base_hits = ROW_COUNT;
RETURN base_hits;
E
[EMAIL PROTECTED] (Jan Wieck) wrote in news:[EMAIL PROTECTED]:
> On 11/30/2004 2:37 PM, Gary L. Burnore wrote:
>
>> Perhaps I wasn't clear. I don't care WHO you are. I've already asked
>> you once to stay out of my email. Further emails from you will be
>> reported to both Yahoo and Comcast as
I've downloaded several versions of postgresql from several mirrors. On
none of them did the md5 checksums from
http://www.gtsm.com/postgres_sigs.html match the md5 checksum from the
postgresql-*.tar.gz source file I downloaded.
I can't imagine that all these file are corrupted, yet I don't see
Maksim Likharev <[EMAIL PROTECTED]> writes:
> consider following code:
> CREATE OR REPLACE FUNCTION rowcount_test() RETURNS bigint AS '
> DECLARE
> base_hits bigint;
> BEGIN
> CREATE TEMP TABLE ltbl_temp AS SELECT 1 AS data;
> GET DIAGNOSTICS base_hits = ROW_COUNT;
> RETURN base
The 7.4.2 manual says the precision of a real number is 6 decimal digits.
Is it possible to force the display of more than six decimal digits of a real
number whithout using to_char() or casting?
Using 7.4.2, FC2.
create table test (f4 float4) without oids;
insert into test values (4877852);
sel
Hi all,
I am throughly enjoying using Postgres 8.0 on Windows, so I can
develop my Windows client against Postgres.
I would like to write some pl/perl functions, and I'm a little stumped.
Now comes the sad confession - I installed PG from the Windows installer
rather than building it. Can
Joachim Zobel <[EMAIL PROTECTED]> writes:
> Checking my build dirs I find that no plperl.so has been build
> (--with-perl was used in configure). Instead I find a libplperl.so in
> the pgperl build directory.
That's how it's built, but it should be installed as plperl.so. Are you
sure you are loo
Rodrigo,
> Our machine it's a Dell Server Power Edge 1600sc (Xeon 2,4Ghz, with 1GB
> memory, 7200 RPM disk). I don't think that there is a machine problem
> because it's a server dedicated for the database and the cpu utilization
> during the restore is around 30%.
In addition to Tom and Shridhar
Am Mi, den 01.12.2004 schrieb Tom Lane um 21:22:
> Joachim Zobel <[EMAIL PROTECTED]> writes:
> > Checking my build dirs I find that no plperl.so has been build
> > (--with-perl was used in configure). Instead I find a libplperl.so in
> > the pgperl build directory.
>
> That's how it's built, but i
On Wed, Dec 01, 2004 at 20:25:28 -0300,
Clodoaldo Pinto <[EMAIL PROTECTED]> wrote:
> The 7.4.2 manual says the precision of a real number is 6 decimal digits.
>
> Is it possible to force the display of more than six decimal digits of a real
> number whithout using to_char() or casting?
I think
Clodoaldo Pinto <[EMAIL PROTECTED]> writes:
> The 7.4.2 manual says the precision of a real number is 6 decimal digits.
> Is it possible to force the display of more than six decimal digits of a real
> number
Perhaps the extra_float_digits runtime parameter is what you want?
(You are of course awa
On Wed, Dec 01, 2004 at 10:48:40 -0800,
Scott Frankel <[EMAIL PROTECTED]> wrote:
>
> 1.
> CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text);
> CREATE UNIQUE INDEX uidx_thename ON names(the_name);
>
> vs.
>
> 2.
> CREATE TABLE names (the_id SERIAL PRIMARY KEY, the_name text UN
Joachim Zobel <[EMAIL PROTECTED]> writes:
> Am Mi, den 01.12.2004 schrieb Tom Lane um 21:22:
>> That's how it's built, but it should be installed as plperl.so. Are you
>> sure you are looking in the right $libdir?
> I did not give any directory options during install, so
> ls -l /usr/local/pgsql/
Am Mi, den 01.12.2004 schrieb Tom Lane um 22:00:
> Probably more like /usr/local/lib/postgresql ... did you look at the
> directory structure? Or consult pg_config --pkglibdir ?
[EMAIL PROTECTED]:~$ /usr/local/pgsql/bin/pg_config --pkglibdir
/usr/local/pgsql/lib
and there is
[EMAIL PROTECTED]:
On 12/1/2004 1:25 PM, Woodchuck Bill wrote:
Jan, Gary may be blunt at times, but try to understand things from his
perspective. He is posting to Usenet. He expects his replies to appear on
Usenet. You are accustomed to your way of writing and reading messages. He
is accustomed to his way. Perhaps
I have a table where I need to use "..where curdate between fromDate and toDate".
Is it best to have two indexes, one for FromDate and one for toDate or just one index for
both the fields?
Regards,
BTJ
--
46 matches
Mail list logo