On Friday 09 October 2009 08:22:52 pm Tom Lane wrote:
> Mike Diehl writes:
> > I'm doing a routine vacuum on my database and it seems to be getting
> > "stuck."
> >
> > I've got a "servers" table with only a few rows and columns in it and
> > this is what vacuum has to say:
> >
> > # VACUUM ANALYZ
On Fri, Oct 9, 2009 at 8:23 PM, Nick wrote:
> This is a very abbr version of my problem, but what would be the best
> way to do this...
>
> DECLARE
> column_name_var TEXT;
> BEGIN
> RETURN NEW.column_name_var;
> END;
plpgsql doesn't really do dynamic column names. You'll need to
implement it i
On 2009-10-07, Dave Huber wrote:
> --_000_7CDADB576E07AC4FA71E1B12566C9126540E0A0C34ltimb1LTIcom_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> A colleague gave me the following query to run:
>
> DELETE FROM data_log_20msec_table WHERE (log_id IN
On 2009-10-08, Mike Christensen wrote:
> (Sorry for the super-easy question)
>
> I want to store sales tax (as a percent) in the DB, such as 9.5%.
> What's the best data type for this?
real, or numeric, probably numeric.
> I'm guessing numeric(2,3) should be fine, yes?
depends on the range of
On 2009-10-09, Peter Eisentraut wrote:
> On Fri, 2009-10-09 at 11:46 -0700, Christophe Pettus wrote:
>> Domains are basically type aliases with an optional CHECK clause, so
>> you could do something like:
>>
>> CREATE DOMAN sales_tax_rate AS DECIMAL(5,5) CHECK (VALUE >= 0);
>>
>> Then, yo
On 2009-09-29, Alan Hodgson wrote:
> On Tuesday 29 September 2009, Sam Mason wrote:
>> ?? I'm not sure what you're implying about the semantics here, but it
>> doesn't seem right. COPY doesn't somehow break out of ACID semantics,
>> it's only an *optimization* that allows you to get large quanti
Jasen Betts wrote:
On 2009-10-09, Peter Eisentraut wrote:
On Fri, 2009-10-09 at 11:46 -0700, Christophe Pettus wrote:
Domains are basically type aliases with an optional CHECK clause, so
you could do something like:
CREATE DOMAN sales_tax_rate AS DECIMAL(5,5) CHECK (VALUE >= 0);
Th
On Oct 10, 2009, at 3:33 AM, Jasen Betts wrote:
CREATE DOMAN sales_tax_rate AS DECIMAL CHECK (VALUE >= 0 AND VALUE
<=1);
why the latter check ( VALUE <=1 )?
Since this version has no scale on the DECIMAL, the second check keeps
it from being larger than 1.0, since it's presumably a percen
On 10 Paź, 04:38, t...@sss.pgh.pa.us (Tom Lane) wrote:
> Alvaro Herrera writes:
> > Michal Szymanski wrote:
> >> In old version of Postgres we have to execute 'VACUUM FULL' to solve
> >> problem of transaction ID wraparound, do we need to execute 'VACUUM
> >> FULL' in Postgres 8.3 or 8.4 to avoid
Greetings,
I'm attempting to build a version of PG 8.4.1 with the OSSP uuid
libraries on Centos 5.3 (I'm building PG from source). I simply
cannot seem to find the right libraries to install; even very
promising candidates seem to be a different version than the one PG is
expecting. Con
I'm using PDO in PHP for database access (actually Zend Framework), and
following best practice by using parameters in prepared statements.
My question is, what do people normally do when there's a variable
number of parameters? - for example:
select . where item_id in ( ... );
In this cas
Hello
2009/10/10 Raymond O'Donnell :
> I'm using PDO in PHP for database access (actually Zend Framework), and
> following best practice by using parameters in prepared statements.
>
> My question is, what do people normally do when there's a variable
> number of parameters? - for example:
>
> se
Christophe Pettus writes:
> I'm attempting to build a version of PG 8.4.1 with the OSSP uuid
> libraries on Centos 5.3 (I'm building PG from source). I simply
> cannot seem to find the right libraries to install; even very
> promising candidates seem to be a different version than the one P
I am porting some code from Perl to Python; in the Perl original I use
either DBI::do or a rickety home-built module to pass multiple SQL
statements (as one single block of SQL) to the Pg server. The typical usage
is something like this:
$dbh->do( <
> Neither, really. The cast shortcut you're using is binding to the
> digits more tightly than the minus prefix.
I see, thanks.
--
Scott Ribe
scott_r...@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To m
On Saturday 10 October 2009 12:09:29 pm Kynn Jones wrote:
> I am porting some code from Perl to Python; in the Perl original I use
> either DBI::do or a rickety home-built module to pass multiple SQL
> statements (as one single block of SQL) to the Pg server. The typical
> usage is something like
On Oct 10, 2009, at 11:53 AM, Tom Lane wrote:
Whose uuid package are you using?
http://www.ossp.org/pkg/lib/uuid/
Building from source.
If it's something you built
from source, it more than likely installed into /usr/local/, and
then your problem is that PG isn't searching /
On Saturday 10 October 2009 12:27:39 pm Adrian Klaver wrote:
> On Saturday 10 October 2009 12:09:29 pm Kynn Jones wrote:
> > I am porting some code from Perl to Python; in the Perl original I use
> > either DBI::do or a rickety home-built module to pass multiple SQL
> > statements (as one single bl
On Sat, Oct 10, 2009 at 4:14 PM, Adrian Klaver wrote:
> On Saturday 10 October 2009 12:27:39 pm Adrian Klaver wrote:
> > On Saturday 10 October 2009 12:09:29 pm Kynn Jones wrote:
> > > I am porting some code from Perl to Python; in the Perl original I use
> > > either DBI::do or a rickety home-bu
On Sat, 10 Oct 2009, Adrian Klaver wrote:
One way
Using psycopg2
DSN = "dbname=? user=? port=? host=?"
con = psycopg2.connection(DSN)
cur = con.cursor()
cur.execute(statement1)
cur.execute(statement2)
con.commit()
Another way, not tested, is triple quote entire block above and pass it to
c
I am a PostgreSQL novice. I successfully installed 8.3.3 on a Windows
XP Pro machine using the pgInstaller and have been using it since. Now I
want to upgrade to 8.4.1.
The only installer I can find for Windows for 8.4.1 is the One Click
installer provided by EnterpriseDB. If I attempt to run
On Saturday 10 October 2009 1:24:05 pm Kynn Jones wrote:
> On Sat, Oct 10, 2009 at 4:14 PM, Adrian Klaver wrote:
> > On Saturday 10 October 2009 12:27:39 pm Adrian Klaver wrote:
> > > On Saturday 10 October 2009 12:09:29 pm Kynn Jones wrote:
> > > > I am porting some code from Perl to Python; in t
On 10/10/2009 18:52, Pavel Stehule wrote:
> 2009/10/10 Raymond O'Donnell :
>> My question is, what do people normally do when there's a variable
>> number of parameters? - for example:
>>
>> select . where item_id in ( ... );
>>
>
> You can use arrays here.
>
> select ... where item_id = A
SELECT TRUE WHERE '/steps/?step=10' ~ '^\/steps\/\?step=10$'
Im guessing its an escape issue, but where am I going wrong?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Nick wrote:
> SELECT TRUE WHERE '/steps/?step=10' ~ '^\/steps\/\?step=10$'
> Im guessing its an escape issue, but where am I going wrong?
You need to double-escape the question mark: Once for the
string literal, once for the regular expression (and you do
not need to escape the slashes). This g
> "Nick" == Nick writes:
Nick> SELECT TRUE WHERE '/steps/?step=10' ~ '^\/steps\/\?step=10$'
Here's the first clue:
merlyn=# select '^\/steps\/\?step=10$';
WARNING: nonstandard use of escape in a string literal
LINE 1: select '^\/steps\/\?step=10$';
^
HIN
Adrian,
While I was walking the dog I thought of a better solution.
>
> sql_str = """ALTER TABLE %(xn)s OWNER TO xdev;
> GRANT ALL ON TABLE %(xn)s TO xdev;
> REVOKE ALL ON TABLE %(xn)s FROM PUBLIC;
> GRANT SELECT ON TABLE %(xn)s TO PUBLIC;"""
>
> cur.execute(sql_str,{'xn':table_name})
> --
>
Thi
On Saturday 10 October 2009 5:48:39 pm Massa, Harald Armin wrote:
> Adrian,
>
> While I was walking the dog I thought of a better solution.
>
> > sql_str = """ALTER TABLE %(xn)s OWNER TO xdev;
> > GRANT ALL ON TABLE %(xn)s TO xdev;
> > REVOKE ALL ON TABLE %(xn)s FROM PUBLIC;
> > GRANT SELECT ON T
pere roca wrote:
hi,
some nice tool over there to let non-SQL knowing people to construct their
queries? I'm using pgAdmin III but I know some SQL.
there is no other option than constructing an HTML with forms, drop-down
menus...?
thanks,
pERE
Your best bet which is not free is
oracle handles html output with packages ..i would assume pg would have similar
sgml output capability?
crystal has been limited to ODBC dsn (datasources) althogh sap seem to be open
to a more Opensource approach using
JDBC based data sources
Martin Gainty
Christophe Pettus writes:
> On Oct 10, 2009, at 11:53 AM, Tom Lane wrote:
>> Whose uuid package are you using?
> http://www.ossp.org/pkg/lib/uuid/
> Building from source.
> It is indeed installing it in /usr/local/lib, but the ldconfig was
> set. What's irritating is that (looking at con
Martin Gainty wrote:
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
Hi,
Could any one please tell me what is statement ID of table? How to get it
and in which scenarios it can be helpful? Any documentation or example about
statement ID would also really helpful for me.
Thanks,
Jignesh
33 matches
Mail list logo