24, 2015 12:50 PM
To: Gauthier, Dave
Cc: Postgres General
Subject: Re: [GENERAL] DB access speeds, App(linux)<->PG(linux) vs App(linux)
<->MSSql(Windows)
Hi Dave:
On Wed, Jun 24, 2015 at 3:44 PM, Gauthier, Dave wrote:
> Hi: I'm trying to get a 10,000 ft understanding of the
o:a...@squeakycode.net]
Sent: Wednesday, June 24, 2015 10:10 AM
To: Gauthier, Dave; Postgres General
Subject: Re: [GENERAL] DB access speeds, App(linux)<->PG(linux) vs App(linux)
<->MSSql(Windows)
On 6/24/2015 8:44 AM, Gauthier, Dave wrote:
> Hi: I'm trying to get a 10,000 f
Hi: I'm trying to get a 10,000 ft understanding of the difference in DB access
speeds for two different scenarios...
Scenario 1: Apps are on linux. PG DB is on linux (different server than
apps)
Scenario 2: Apps are on linux. MSSql DB is on Windows (obviously a
different server)
The
In theory, you could write a script that opens both DBs, then systematically
inserts or updates records in the destination DB table based on what's in the
source DB table. Brute force, but automatable.
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Beh
What about a regexp match ?
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Tom Lane
Sent: Thursday, February 06, 2014 10:32 AM
To: alexandros_e
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Postgresql GROUP BY
Hi:
Longshot, but here goes
Someone is asking me for a way to architect a model which will store basic
table data (columns with names and rows), but the number and name of the
columns are both variables. I'll call these "data-tables" here.
Example, Store this "data-table"
'col1'
I have a DB that relies heavily on recursive stored procedures that tap
reflexive tables that store hierarchical data. These procedures are called
from queries and return record streams. Temp tables are used to store
collected data as the procedure runs up/down the hierarchy. And many other
I find stored procedures to be a God-send. The alternative, external code, is
the risky, difficult and often poorer performing approach to the problems sp's
solve. What better way to interact programatically with your database than
WITH your database?
The only people that I see frown upon th
Hi:
v9.0.1 on linux
Is there a way to query on synonyms of a value transparent to the user?
For example, a column called "animal" can have any text value, including
'horse' and 'cow' and 'pig'. But I want the user to find all the animal='pig'
records if they specify 'hog' instead.
So..
v9.0.1 on linux
thedb=# select
||bicolumn||,
coalesce(permitted_values,'is_null'),
case permitted_values when NULL then 'null' else ||permitted_values||
end
from bi_constraints limit 2;
?column?| coalesce| case
+---+
Hi:
v9.0.1 on linux.
I have a table with a column that is a csv. Users will select records based
upon the existence of an element of the csv. There is an index on that column
but I'm thinking that it won't be of much use in this situation. Is there a
way to facilitate these queries?
Exampl
Many, many (many) years ago, while working at DIGITAL EQUIPMENT (before it
bellied up), I worked with a relational DB they created called "RDB". Someone
at DEC wrote an sql development gui in Xwindows called "InstantSQL". It was
really great. All the tables of the DB were icons, you could dra
Is there anything like this soln for v8.3.4 ?
I know, I know, just upgrade. But its out of my hands.
-Original Message-
From: Pavel Stehule [mailto:pavel.steh...@gmail.com]
Sent: Wednesday, February 13, 2013 9:24 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re
Trying ( and failing) to get this to run...
select regexp_replace(pg_get_functiondef(proname::regproc),E'[ ]+\\+\n','\n')
from pg_proc where proname = 'maketime';
Goal is to remove the space padding and the "+" at the end of each line in the
dump of pg_get_functiondef, something that could actu
]
Sent: Wednesday, February 13, 2013 9:26 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to get stored procedure args list from metadata
tables ?
On 02/13/2013 06:13 AM, Gauthier, Dave wrote:
> Hi:
>
> Looking for a table or view which contains the list of
Excellent !
Thank You very much !
-Original Message-
From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at]
Sent: Wednesday, February 13, 2013 9:30 AM
To: Gauthier, Dave; pgsql-general@postgresql.org
Subject: RE: How to get stored procedure args list from metadata tables ?
Dave Gauthier
Hi:
Looking for a table or view which contains the list of arguments that are
passed to a stored procedure. Doesn't seem to be in pg_proc.prosrc or other
pg_proc columns.
Thanks in Advance for any help.
OK, with the help of this feedback, they caved and will keep it local storage.
Thanks !
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Can PG V9.1* support a DB that's on an NFS disk?
I googled around, but nothing popped out.
Also, would you happen to know the answer to this for MySQL v5.5*?
Thanks in Advance.
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Steve Clark
Sent: Thursday, January 24, 2013 12:46 PM
To: Jeff Janes
Cc: Chris Angelico; pgsql-general@postgresql.org
Subject: Re: [GENERAL] noobie question
On 01/24/2013
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Steve Clark
Sent: Thursday, January 24, 2013 11:47 AM
To: pgsql
Subject: [GENERAL] noobie question
Hi list,
This may be really simple - I usually do it using a procedura
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Shridhar Daithankar
Sent: Wednesday, January 23, 2013 10:32 PM
To: pgsql-general@postgresql.org
Cc: Gauthier, Dave; Rob Sargent
Subject: Re: [GENERAL] DB alias ?
On Wednesday, January 23, 2013 09
ginal Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Steve Crawford
Sent: Wednesday, January 23, 2013 4:38 PM
To: Rob Sargent
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] DB alias ?
On 01/23/2013 01:16 PM, Rob Sargent wrote:
> O
On Behalf Of Rob Sargent
Sent: Wednesday, January 23, 2013 4:16 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] DB alias ?
On 01/23/2013 02:10 PM, Gauthier, Dave wrote:
> Nope. Think of it this way, a new DB is created on day 1 of every month. So
> there's a DB called
h. In the meantime, I want those
who try to connect to FEB to connect to JAN (for example).
-Original Message-
From: Joshua D. Drake [mailto:j...@commandprompt.com]
Sent: Wednesday, January 23, 2013 4:04 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] DB alias ?
Problem: Some users (scripts actually) try to connect to a DB who's name is
derived from environmental variables. The DB doesn't exist (yet), and I want
them to connect to a different DB for the time being. Is there a way to define
an alias for the existing DB that = the db name that doesn't
One thing I've done in the past is to create a temporary table and insert
"raise notice" debug statements to it, incrementing a sequence as it went
along. Then just select the message with order by the seq. Useful in the
recursive calls I was testing at the time. But it did require that I sti
The fix had to do with connecting as the "insert" user, then setting the
default privs. My mistake was to run the "alter default privileges..." as the
superuser.
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier,
v9.1 on linux
Connect to postgres DB, then...
create user "select" password 'select';
create user "insert" password 'insert';
alter default privileges for user "insert" grant select on tables to "select";
alter default privileges for user "insert" grant select on sequences to
"select";
alter def
What's wrong with this picture. Trying (failing) to create a user called
"select" with default select privs and nothing else. Demo below. Comments in
red...
fcadsql7> psql sde
psql (9.1.5)
Type "help" for help.
sde=# \du
List of roles
Role name |
psql (9.1.5)
Type "help" for help.
sde=> select * from foo;
ERROR: permission denied for relation foo
sde=>
.
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave
Sent: Wednesday, December 05, 2012 8:00 AM
To: Chri
ubject: Re: [GENERAL] how do I grant select to one user for all tables in a DB?
On Wed, Dec 5, 2012 at 2:12 PM, Gauthier, Dave
mailto:dave.gauth...@intel.com>> wrote:
> V9.1.5 on linux
> User "select" created (yup, that's right, they want the user name to
> be "s
V9.1.5 on linux
User "select" created (yup, that's right, they want the user name to be
"select". Guess what ptivs it is to have! Don't kill the messanger :-) )
postgres=# grant select on all tables in schema sde to "select";
ERROR: schema "sde" does not exist
postgres=# \l
Thanks for the answers. But I also have a predicate...
select col1,col2 from foo where col4='c4' and col5 <> 'xxx';
How is that done?
From: Richard Broersma [mailto:richard.broer...@gmail.com]
Sent: Tuesday, October 23, 2012 3:24 PM
To: ch...@chriscurvey.com
Cc: Gau
Here's the deal...
Instead of architecting and loading a table like...
create teble foo (col1 text, col2 text, col3 text, col4 text, col5 text);
insert into foo (col1,col2,col3,col4,col5) values ('c1',null,'c3','c4',null);
They did this instead...
create table foo (property text, value text);
in
One thing I sometimes forget to do after loading up an empty DB with data is to
run "analyze". I usually "remember" once I see poor query performance, run the
analyze, and its fixed.
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org]
If its not too much work, swap them around and retest to see if its really the
DB/version or the machine.
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Scott Marlowe
Sent: Friday, September 21, 2012 3:01 PM
To: salah
Is there a way to determine when a DB was created (create database...)?
Thanks in advance.
I googled around and found that adding/dropping columns from views is not
available. (if not true, I'm all ears).
Given that, what's the best way to do this? I was thinking along the lines of
a stored procedure that reads the view's definition, modifies it, drops the
view, recreates the view.
Yup, works like a charm.
Thanks Salah and Tom for the advise !
-dave
-Original Message-
From: Tom Lane [mailto:t...@sss.pgh.pa.us]
Sent: Wednesday, August 29, 2012 11:18 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] using vars in ddl in procedure call
Hi:
v9.0.1 on linux.
Trying (failing) a test to see if I can run ddl in a procedure where elements
of the ddl are vars. Consider...
create or replace function newcol (text) returns integer as $$
declare
newcol alias for $1;
begin
alter table target add column newcol text;
return(0);
end
Hi:
I want to create a string from the first 3 elements of a csv (for example).
The csv is longer than 3 elements. Example...
aaa,bbb,ccc,ddd,eee,fff,ggg
I want the string "aaa,bbb,ccc".
Tried splitting this to an array (precursor to appending elements 1,2,3), but
failed to be able to ref
With \timing set on, I run an update statement and it reports
Time: 0.524 ms
Is that really 0.524 ms? As in 524 nanoseconds?
Also, is this wallclock time or some sort of indication of how much cpu it took?
Thanks for any answers !
..@ringerc.id.au]
Sent: Thursday, August 23, 2012 9:52 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Can column name aliases be supported?
On 08/23/2012 09:32 PM, Gauthier, Dave wrote:
> The view approach for queries is workable, at least for queries. Thanks fo
Thanks for all the replies !
The real problem has nothing to do with names. I just used that as a vehicle
for articulating the problem.
The view approach for queries is workable, at least for queries. Thanks for
the input on that and the idea to replicate the various aliases in the view!
I
Here's the problem
I have a table with a column called "last_name". I have one customer who likes
to articulate queries and updates for this using column name "last_name" (no
problem there) but another who likes to call it "lname" and yet another who
likes to call it "surname".So 3 dif
Here's the problem...
Five sites, one DB, all 5 sites have read/write to the DB. If one site goes
down, the other 4 should be able to continue to work with the DB (read and
write). When the dead site comes back on line, it ought to be able to rejoin
the group. If one site become isolated (n
Hi:
Inside a perl/dbi script, I want to determine which privs (select, insert,
update, delete, ...) user 'foo' has on table 'footable'. There must be
metadata tables or a view that has this.
Hi: I think I know the answer to this, but the desire/need is great enough to
get confirmation here.
Is there a way to alias a db name for purposes of redirecting connections?
For example, you have 2 DBs, DBX and DBY. The users always connect to a DB
alias called "USEDB". USEDB points to D
Hi:
bi_hsx_a0_latest=# select regexp_replace('xxx','^xxx$','abc');
regexp_replace
abc
(1 row)
expected behavior because there's a match
bi_hsx_a0_latest=# select regexp_replace('xxx','^xxxy$','abc');
regexp_replace
xxx
(1 row)
expected because there is no match
v8.3.4 on linux
After this..
alter table fred alter column wilma set default 'dino';
...it appeared that a user that had insert,delete,update privs lost them.
I regranded and things went back to normal.
Is it correct for those privs to be dropped in this case? If so, why (just
curious).
Thank
Hi:
v8.3.4 on linux
In plpgsql, I have something like this...
if ((string_to_array(check_values_text,',') <@ string_to_array((select
permitted_values from bi_constraints where bicolumn = 'fivr'),',')) = 'f')
It's just testing all the values in the check_values_text csv are in
permitted_values
I'll be running this as "postgres"
Thanks for the help.
Hope others may find this useful.
-Original Message-
From: Bosco Rama [mailto:postg...@boscorama.com]
Sent: Thursday, April 05, 2012 12:04 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL]
uot;pg_ctl kill TERM " to do this)
Make changes as the DBA
Then...
alter role selectuser connection limit -1;
alter role moduser connection limit -1;
Done !
Correct?
-Original Message-
From: Bosco Rama [mailto:postg...@boscorama.com]
Sent: Thursday, April 05, 2012 11:27 AM
To: Ga
adata changes while users active
On 04/04/2012 09:26 PM, Gauthier, Dave wrote:
> v8.3.4 on linux
>
> Here's the problem...
>
> I need toboot them off and prevent them from getting back in so that I
> can make the changes, then re-enable them. There are 2 users, lets call
> them
v8.3.4 on linux
Here's the problem...
I have to make some metadata changes, add columns to a table, add constraints,
drop a view, recreate it. I used to be able to do this by booting users off,
and then quickly make the changes before they get back in. They now have
software that seems to con
OK, and understood.
And yes, I thought it was a global.
Thanks Tom.
-Original Message-
From: Tom Lane [mailto:t...@sss.pgh.pa.us]
Sent: Monday, March 26, 2012 10:52 AM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] "OLD used in query that is not in a
I get... "OLD used in query that is not in a rule" when trying to ref, for
example, OLD.tblcol1, from inside a stored procedure. Is this saying you
cannot use OLD.* (or NEW.* I suppose) unless it's from within a trigger
function (returns type "trigger")?
If so, is there some way to tap this in
v8.3.4 on Linux
I have a check constraint on a column. The constraint decides pass/fail based
on the returned status of a stored procedure call that returns either "OK" or
"NO". So when the stored procedure is called, there's a living attempt to
insert or update a record.
Question: Is there
.
-Original Message-
From: Scott Marlowe [mailto:scott.marl...@gmail.com]
Sent: Thursday, January 26, 2012 5:39 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Preventing access temporarily.
On Thu, Jan 26, 2012 at 3:05 PM, Gauthier, Dave wrote:
> PG V9.0.
PG V9.0.1 on Linux
I want to temporarily prevent users from connecting to a DB, let the existing
connections finish, , re-enable connections.
What's the best way to do that?
Thanks in Advance
Why am I getting this?
xdb=# alter table templates add constraint manager_uid_is_invalid check
((constraint_checker('manager',manager,null,null)) = 'OK') DEFERRABLE ;
ERROR: syntax error at or near "DEFERRABLE"
LINE 1: ...int_checker('manager',manager,null,null)) = 'OK') DEFERRABLE...
v8.3.4 on
Like a charm. Thanks!
-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com]
Sent: Wednesday, December 07, 2011 9:57 AM
To: pgsql-general@postgresql.org
Cc: Gauthier, Dave
Subject: Re: [GENERAL] making "\pset pager off" the default
On Wednesday, December 07,
Hi:
How can I make "pager off" the default when running psql ?
v8.3.4 and v9.0.1 on linux.
v8.3.4 on linux
Is there a way to set the query used in a "for rec in (query) loop -> end loop"
be a variable? Example
if (foo = 'whatever')
then
sqlstmt := "select x,y,z ...";
else
sqlstmt := "select a,b,c ...";
end if ;
for therec in
sqlstmt
loop
...
end loop;
Thanks in Advance f
Hi:
SImple/quick (hopefully)
thedb=# \dT+
List of data types
Schema | Name| Internal name | Size | Elements | Description
+---+---+---+--+-
public | one_string_rec| one_string_rec
You set the trigger to fire off whenever ed_expore.bv is inserted or updated.
Then the trigger updates ed_explore.bv, which fires the update trigger again,
etc... . Infinite loop. No?
Maybe you just want to use a before trigger to set that value before the
insert, then you wouldn't need the
: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] pg_dump of a v8.3.4 -> v9.0.1
On 11/23/2011 08:08 AM, Gauthier, Dave wrote:
> Hi:
>
> I have a pg_dump pf a v8.3.4 DB that I would like to bring into a v9.0.1
> PG instance. What is the best way to do this? Note, t
Hi:
I have a pg_dump pf a v8.3.4 DB that I would like to bring into a v9.0.1 PG
instance. What is the best way to do this? Note, the dump file is too big to
fit into an editor, but I could sed it if need be.
Thanks.
12:37 PM, Gauthier, Dave wrote:
> bi_dev=# select name from test where name ~ '^(' || replace('jo,mo,do,fo',
> ',', '|') || ')l';
> ERROR: argument of WHERE must be type boolean, not type text
ah, needs () around the right side of the ~
The example was a general case. It won't be jo and mo and fo. In fact, the
values will be stored in a csv perl scalar.
If you know perl...
$str = "jo,mo,do,fo";
Using DBI, I need to "prepare" a query that will accept a string like the one
above.
So...
select name,age,weight from people_ta
Hi:
How can I search on a csv list of values using "like" where each value is to be
appended with a wildcarded string?
Example:
list = 'jo,mo,do,fo'
I want to pull all names from a table with name like.. 'jol%' or 'mol%'
or'dol%' or 'sol%'
would match "jolly, molly, moleman,dollface, solarboy
pg_ctl --help lists the various SIGNALNAME options to use with "pg_ctk kill"...
Allowed signal names for kill:
HUP INT QUIT ABRT TERM USR1 USR2
I can't find a description of what each does. I'd like to abort just the
procpid I enter, but using ABRT has a tendancy to kill lots of other stuff t
11 2:58 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] connections and cpu consumption
On 11/09/11 11:35 AM, Gauthier, Dave wrote:
> A... so if the script that has the connection open would only terminate
> the transaction, then vacuum wouldn't get behind?
>
> I act
g.
Thanks!
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of John R Pierce
Sent: Wednesday, November 09, 2011 2:21 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] connections and cpu consumption
On 11/09/11 10:35 AM
Hi:
PG v4.8.3 on Linux
I'm using "selcet procpid,current_query from pg_stat_activity" to monitor
activity during times when "top" is showing many PG procs with very high cpu
usage numbers (all cores at or above 90%). Some of these are procs that map to
PG connections with current_query = .
W
I think you need exclusive access to the table in order to add columns (I'll
stand/sit corrected if the more experienced responders say different). I've
found that you have to either wait for them to get off or kill them first (as
in pg_ctl kill ABRT).
From: pgsql-general-ow...@postgresql.or
Hi:
PG v8.3.4 on linux. Server is at one corporate site, half the DB users are at
that site, the other half are at a different site 2 time zones away. Users
from both sites access the DB through the same, generic postgres user accout
that has select/insert/update/delete only. And almost all
v8.3.4 on linux.
Does "reindex table foo" require no other users accessing the foo table?
Trying to understand why this seems to be stalled when I attempt this on a live
DB (if runs fine/fast on a copy of the DB that no one uses).
Should I run this inside a transaction?
Thanks in Advance !
Hi:
I need to be able to select all records with a col value that matches any of a
list of regexp. Sort of like...
select a,b,c from foo where d ~ ('^xyz','blah','shrug$');
Does anyone know the right syntax for this?
Thanks!
, 2011 10:23 PM
To: Gauthier, Dave
Cc: Merlin Moncure; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Reading PG data from MySQL stored procedure
On 10/21/2011 03:56 AM, Gauthier, Dave wrote:
> The software system they are being forced to use gives them the ability to
> send queries to a
ay, October 20, 2011 3:33 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Reading PG data from MySQL stored procedure
On Thu, Oct 20, 2011 at 2:22 PM, Gauthier, Dave wrote:
> Here's a real long shot, but what the heck...
>
>
>
> I have a user that
Here's a real long shot, but what the heck...
I have a user that's using a system that gives him a single MySQL DB handle to
work with. He must get all his data through this handle. He wants some of my
PG based data. Not only can't he open a new DB handle to my PG DB, but he
cannot even run
Hi:
How does one make a metadata change to a DB that's actively being used.
Specifically, I want to drop a view, drop some columns from a table that's used
in the view, recreate the view without those columns.
In the past, I've resorted to connecting as a super user, running "select
procpid f
The identification and deleting of the records using ctids seems to have worked
fine.
Thanks !
-Original Message-
From: Andy Colson [mailto:a...@squeakycode.net]
Sent: Tuesday, September 06, 2011 1:55 PM
To: Thom Brown
Cc: Gauthier, Dave; pgsql-general@postgresql.org
Subject: Re
Hi:
If I have a table that has 2 records which are identical with regard to all
their column values, is there a way to delete one of them, leaving one
remaining? Is there some unique record_id key of some sort I can use for
somethign like this?
Thanks in Advance!
Does PG support the use of an init script or procedure? I'm looking for
something that'll run unconditionally every time someone makes a DB connection.
This script will create a temp table and stuff some data in it for general use
within that session.
Thanks in Advance for any help!
M
To: Alan Hodgson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Need linux uid in pg-psql
Alan Hodgson writes:
> On August 19, 2011 07:01:33 AM Gauthier, Dave wrote:
>> Is there a way to get the linux idsid of a user, even for a remote network
>> connection?
> There
Is there a way to get the linux idsid of a user, even for a remote network
connection?
If not, is there a way to capture this somehow when the original connection is
made and maybe stuff it in a temp table or something using whatever means (a
trigger-like mechanism? ) ? Is there a script/func
http://gigaom.com/cloud/facebook-trapped-in-mysql-fate-worse-than-death/
How would PG stack up in a usage situation like this?
is static.
-Original Message-
From: Peter Geoghegan [mailto:pe...@2ndquadrant.com]
Sent: Thursday, June 16, 2011 9:56 AM
To: Gauthier, Dave
Cc: Igor Neyman; Mike Christensen; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Constraint to ensure value does NOT exist in another
table?
On 16 Ju
I've dealt with something similar by using a check constraint and a stored
procedure. The check constraint calls a stored procedure, passing it (in your
case) the key you want to make sure doesn't exist in some other table. The
stored procedures queries that other table for the key and passes
Hi:
I'd like to pass a parameter into an inline psql call that itself calls an sql
script, something like...
psql mydb -c "\i thesqlscript foo"
Where"foo" is the value I want to pass in.
Just as good would be the ability to sniff out an environment variable from
within the sql script ("thesql
;
insert into maintable (select * from foo);
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave
Sent: Thursday, May 26, 2011 4:24 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] copy record?
Hi:
>From within a perl/DBI scr
Hi:
>From within a perl/DBI script, I want to be able to make a copy of a record in
>a table, changing only the value of the primary key. I don't know in advance
>what all the columns are, just the table name.
I suppose I could pull the column names for the table from the metadata, query
the
Hi:
Is there a way to suppress the "INSERT x x" and "DELETE y" (etc...) messages
in psql?
Thanks in advance
t statements in the order I desire.
Thanks
-Original Message-
From: Tom Lane [mailto:t...@sss.pgh.pa.us]
Sent: Thursday, May 12, 2011 4:06 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] insert order question
"Gauthier, Dave" writes:
> Does...
Hi:
Does...
insert into mytbl (col1) values ('a'),('b'),('c');
... insert records 'a','b','c' in that order while...
insert into mytbl (col1) values ('c'),('b'),('a');
... insert the records in the opposite order?
The order matters because there are triggers on t
Is there a way to add a default value definition to an existing column?
Something like an "alter table... alter column... default 'foo'".
I thought of a clumsy way to do this... create a temp column, set it's value to
that of the column to be altered, drop the column to be altered, redefine it
igger sensitive to this deferral is not something that I wanted to devote a
lot of time to. It just seemed more natural to keep this as a check
constraint.
-Original Message-
From: Jerry Sievers [mailto:gsiever...@comcast.net]
Sent: Thursday, March 31, 2011 4:14 PM
To: Gauthier, Dave
Cc:
1 - 100 of 301 matches
Mail list logo