On 2009-06-09, Jyoti Seth wrote:
> This is a multipart message in MIME format.
>
> --=_NextPart_000_003C_01C9E916.43A8D460
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Hi all,
>
>
>
> Can we take backup of specific data of a table (using where
On 2009-06-10, johnf wrote:
> Hi,
> I'm am programming in python using the Dabo modules. www.dabodev.com if your
> interested. Dabo is a framework that provides an easy way to build desktop
> app's. To clear a data entry form. I have been setting the where clause
> to "where 1=0". This of c
On 2009-06-19, Jyoti Seth wrote:
> This is a multipart message in MIME format.
>
> --=_NextPart_000_0001_01C9F0F8.92EE3490
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Hi All,
>
>
>
> I want to send the sql script file to a client but wants to
On 2009-06-23, Rob Sargent wrote:
>
> Not sure if this belongs here or on the admin or performance list.
> Apologies if so. (And this may be a second posting as the first was from
> an un-registered account. Further apologies)
>
> My assumption is that any de/compression done by postgres would
On 2009-07-18, Gianvito Pio wrote:
> This is a multi-part message in MIME format.
>
> --=_NextPart_000_0017_01CA0791.49E30EB0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi all,
> how can I define a column of timestamp with timezon
On 2009-07-28, Axe wrote:
> I have a problem where I want to tweak a simple select in an
> "unobtrusive way". Imagine I have the following select statement:
> "SELECT name FROM customer LIMIT 1" and I get a normal result set from
> this. But, could I,maybe by defining some other function or simila
On 2009-08-11, Jamie Tufnell wrote:
> Hi,
>
> I am faced with a modeling problem and thought I'd see if anyone has run
> into something similar and can offer some advice.
>
> Basically my problem domain is cataloguing "snippets of information" about
> "entities" which are loosely identified.
>
> E
On 2009-08-11, Jan Verheyden wrote:
>
> Hi All,
>
> I was looking in what way it's possible to alert via mail when some conditi=
> ons are true in a database.
>
> Thanks in advance!
Assuming you mean email, and not ink on paper (hmm, OTOH you could load
postcards into a printer)
you could d
On 2009-08-12, Jan Verheyden wrote:
> --_000_E30C7040DE22624185BAD4093190B54437BE5DB4A9EX2007MBX2uzk_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> It's on Windows
>
I'd go with notify and a listener written in C using c-client to send
emails, bu
On 2009-08-13, Jan Verheyden wrote:
> --_004_E30C7040DE22624185BAD4093190B54437BE5DB4C1EX2007MBX2uzk_
> Content-Type: multipart/alternative;
> boundary="_000_E30C7040DE22624185BAD4093190B54437BE5DB4C1EX2007MBX2uzk_"
>
> --_000_E30C7040DE22624185BAD4093190B54437BE5DB4C1EX2007MBX2uzk_
> Conten
On 2009-08-18, W. Kinastowski wrote:
> I need a functionality of "@>" array operator in 8.1 Pg server. i.ex.
> SELECT * FROM table WHERE array_col @> ARRAY ['xxx'] (works in 8.2,
> error in 8.1)
> How to performe such a query ? Is it possible ? Thanks for help.
SELECT * FROM table WHERE 'xxx'
On 2009-08-18, W. Kinastowski wrote:
> Jasen Betts wrote:
>> On 2009-08-18, W. Kinastowski wrote:
>>
>>> I need a functionality of "@>" array operator in 8.1 Pg server. i.ex.
>>> SELECT * FROM table WHERE array_col @> ARRAY ['xxx'] (
On 2009-08-18, drew wrote:
> Hey all,
> There are two things I need to do:
> 1. Update existing rows with new data
> 2. Append new rows
>
> I need to update only some of the fields table1 with data from
> table2. These tables have the exact same fields.
>
> So here's what I have currently for app
On 2009-08-21, Gerardo Herzig wrote:
> Hi all. There is a way to simulate the `pipe' in linux so y can use
> replace() for replacing 2 different things?
use regexp_replace instead?
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.po
On 2009-09-09, Oliveiros C, wrote:
> This is a multi-part message in MIME format.
>
> --=_NextPart_000_013B_01CA3146.85B62920
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Dear All,
>
> I have a table which has a field that is of typ
On 2009-10-14, Shruthi A wrote:
> --0016e64698e4af821f0475e1f43d
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I'm using Enterprise DB PostgresPlus version 8.3.
> Is there is a simple function or command like previous_date(mydate) which
> when passed a particular date, simply returns
On 2009-11-01, Andrew Hall wrote:
> 1. Default Roles -> a role which is activated at login time. Oracle imposes=
> a limit on the number of default roles which any given user can have.
>
> 2. Non-default role -> a role which has to be explicitly activated during t=
> he lifecycle of an applicati
On 2009-12-04, Another Trad wrote:
> --001485f94df095921c0479ea62fd
> Content-Type: text/plain; charset=ISO-8859-1
>
> My table 'client' has the unique 'client_id'.
> My test server, when I try:
> select * from client where client_id = 12
> My server returns 3 rows
I had similar with a client
On 2009-12-09, Andreas wrote:
> Hi,
...
> stupid example:
> ---
> color: red, green, blue
> size: tiny, little, big, giant
> structure: hard, soft, floppy
>
> How would I solve the rather common text storage issue?
have you considered using enumerated types instead?
--
Sent vi
On 2009-12-31, Michael Gould wrote:
> Gary,
>
> Based on what I read it wouldn't handle cases where the result should be
>
> MacDonald from macdonald. There are other cases such as the sentence below
>
> ('it''s crazy! i couldn''t believe kate mcdonald, leo dicaprio, (terrence)
> trent d''arby (c
On 2010-01-11, gher...@fmed.uba.ar wrote:
> CREATE FUNCTION valores_sustitucion(valor_ingresado varchar[])
> returns varchar
> as
> $$
> select case
> $1[1] when 'Action_1' then
> (select descripcion from load_by_cod($1[2]))
>
>when 'Action_2' then (select descripcion from pay_by_view($
On 2010-01-11, gher...@fmed.uba.ar wrote:
> So, i come with this:
> SELECT regexp_replace(
> formato, E'{([^.]*)\.([a-zA-Z0-9]*)},
> valores_sustitucion(ARRAY[E'\\1'::varchar,E'\\2'::varchar]),
> 'g')
> from table where id =1;
select valores_sustitucion(ARRAY[E'\\1'::varchar
On 2010-02-09, Louis-David Mitterrand
wrote:
> Hello,
>
> In my database I have different object types (person, location, event,
> etc.) all of which can have several images attached.
can one image be several people?
can one image be both event and location?
> What is the best way to manage a
On 2010-02-17, silly sad wrote:
>
> acc=>
>
> CREATE OR REPLACE FUNCTION add_user (TEXT, TEXT, TEXT, TEXT)
> RETURNS usr AS $$
>INSERT INTO usr (login,pass,name,email) VALUES ($1,$2,$3,$4)
>RETURNING usr.*;
> $$ LANGUAGE sql SECURITY DEFINER;
>
> acc=>
>
> ERROR: return type mismatch in f
On 2010-03-01, Gianvito Pio wrote:
> --001485f44fc07594a40480c43c01
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all,
> is there a way to define functions and/or triggers in a function?
assuming plpgsql: execute
> For example, can I create a function that takes an argument and defines a
On 2010-03-06, Petru Ghita wrote:
>
> Given f1(x) as IMMUTABLE and f2(x) as IMMUTABLE, and f3(f1,f2) as
> IMMUTABLE, does the query planner cache the result of f3 and reuse it
> or if you want to get a little more speed you better explicitly define
> yourself f3 as IMMUTABLE?
>
> I had an aggreg
On 2010-03-10, Navanethan Muthusamy wrote:
> --0016e68e9a5510f1f504816d1fcb
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I am using Postgresql 8.4, Can you tell me How Can I use Money data type?
it's best not to, "money" is a fixed-point fromat based on 32 bit
integers, abn it's
On 2010-03-13, Gianvito Pio wrote:
> Hi all,
> is there a way to write a function that can only be called by another
> function but not directly using SELECT function_name ( )?
not really.
but there may be another way to get the effect you want.
--
Sent via pgsql-sql mailing list (pgsql-sql@
On 2010-03-08, query wrote:
> --=_484d28810a276e7b5e461f0328ee205f
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> I want to display data for all days in a month even if no data
> exists for that month. Some of the days in a month might not have any
> data
On 2010-03-25, Leif Biberg Kristensen wrote:
> I'm struggling with how to make plpgsql iterate through a list of numbers
> input as a text string, eg. "1438 2656 973 4208". I figure that I can use the
> regexp_split_to_array() function to make an array of the string, but can I
> iterate through
On 2010-03-27, Hiltibidal, Rob wrote:
> U only 52 calendar weeks in a year... I'm almost sure that is the
> norm
All hours have 60 minutes
All weeks have 7 days
All years have 12 months
all else is variable.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to
ate enum_agreement_state)
RETURNS boolean AS
$$
SELECT
CASE COUNT(agreement_id)
WHEN 0 THEN true
WHEN 1 THEN $3 != 'approved'
ELSE false
END FROM agreements WHERE subject_id = $1 AND agreement_state
= 'approved' a
On 2010-04-29, Andreas wrote:
> Hi,
>
> while writing the reply below I found it sounds like beeing OT but it's
> actually not.
> I just need a way to check if a collumn contains values that CAN NOT be
> converted from Utf8 to Latin1.
> I tried:
> Select convert_to (my_column::text, 'LATIN1') fr
On 2010-04-29, Justin Graf wrote:
> I'm pretty sure this is the regualr expression to find all non ASCII=20
> chars.. [^\x00-\xFF]
Not in postgres.
\x00 does not work well in strings, and \xFF is invalid utf-8.
this is why I used char()
(also ASCII is undefined past at \x7F ... but the or
On 2010-04-30, silly sad wrote:
> suppose i request
>
> SELECT foo(t.x) FROM t LIMIT 1;
>
> Whither it DEFINED how many times foo() will be executed?
foo will be executed repeatedly until it returns a result or all the
rows in t are exhausted.
> May anyone rely on it?
not sure
> Or we have to
On 2010-05-06, Thomas Kellerer wrote:
> Tom Lane, 06.05.2010 00:51:
>> Thomas Kellerer writes:
>>> I'm trying to get the output of the to_char(date, text) method in German
>>> but I can't get it to work:
>>
>> I think you need 'TMMon' to get a localized month name.
>>
>> reg
On 2010-05-12, Josh wrote:
> Hello, I'm a little new at this so please bear with me.
>
> I am trying to create a function that loads 100M test records into a
> database, however I am having a hard time building the function that
> does so.
>
> I'm trying to do this in PGAdmin III for Ubuntu. I
On 2010-05-11, Torsten Zühlsdorff wrote:
> Hello,
>
> i have a problem with a trigger written in pl/pgsql.
>
> It looks like this:
>
> CREATE OR REPLACE FUNCTION versionize()
> RETURNS TRIGGER
> AS $$
> BEGIN
>
>NEW.revision := addContentRevision (OLD.content_id, OLD.revision);
>
>/* not w
On 2010-05-18, Kenneth Marshall wrote:
> I am trying to write a function that updates the
> date column to the current date. According to:
>
> http://www.postgresql.org/docs/8.4/static/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT
>
> you can use CURRENT_DATE. When I try to use it in
> the fo
On 2010-05-26, Gerardo Herzig wrote:
> Hi all. Im not being able to cast a record variable into an array.
>
> Im writing a trigger, and i would like to store NEW (and OLD) as text[].
> There is a way to do it in plpgsql? (w/o any contrib modules)
why not store them as text instead?
new::text
On 2010-05-27, Brent DeSpain wrote:
> --00504502c13812967604879b4ba3
> Content-Type: text/plain; charset=ISO-8859-1
>
> It looks like most of our tools are using the Perl version of regular
> expressions with an upper limit of a bound being 32766. Is there any way to
> change this in PG? Or can
On 2010-05-29, Tim Landscheidt wrote:
> Jasen Betts wrote:
>
>>> It looks like most of our tools are using the Perl version of regular
>>> expressions with an upper limit of a bound being 32766. Is there any way to
>>> change this in PG? Or can I change from PO
On 2010-06-02, Wes James wrote:
> On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
> wrote:
>> Hi,
>> Have you already tried this out?
>>
>> select MAX(page_count_count) - MIN(page_count_count) from page_count group
>> by page_count_pdate.
>>
>>
>> Best,
>> Oliveiros
>
> Oliveiros,
>
> Thx that mostly
On 2010-06-22, Bryan White wrote:
> I was suprised to find out that ORDER BY is case insensitive. Is
> there a way to do a case sensitive ORDER BY clause?
use bytea instead of a text type.
> This transcript demonstrates what I am seeing:
>
> bryan=# select * from t order by f;
> f
> ---
> a
>
On 2010-06-24, Joshua Gooding wrote:
> Right now I am in the process of migrating an Oracle DB over to Postgres
> 8.4.3. The table is partitioned by size. Is there anyway to partition
> the new postgres table by size? I created some partitions for the new
> table, but I didn't give postgres
On 2010-06-25, Lee Hachadoorian wrote:
> Is it documented anywhere that floating-point numbers round
> "scientifically", that is 0.5 rounds to the nearest even number?
That's swiss rounding. And no, as I understand it documented that
most arithmetic) is platform specific.
Postgres is written
On 2010-06-25, Lee Hachadoorian wrote:
>
>
> On 06/25/2010 07:00 PM, Scott Marlowe wrote:
>> That all floating point representations are approximate?
>>
> But if it's error due to approximation, shouldn't the result be random?
> I tried this for a handful of larger numbers, and it appears to
> con
On 2010-11-16, Andreas wrote:
> Hi,
>
> I frequently get tables from spreadsheets to import into the DB.
>
> Usually it looks like this:
> A1, A2, A3, A4, B1, B2, B3, with optional C1, C2, D1, D2, ...
>
> and there is a 1:n relation between A and B.
> If provieded the C would be 1:1 to A and
On 2010-11-29, Jorge Arenas wrote:
> select zona_id from zonas where zona_id not in (select zona_id from usuarios
### ######
> where per_id =2)
select 'FRED' from from usuarios where per_id =2
what'shappening is your not in subquery is be
On 2010-11-30, Jeff Bland wrote:
> This is a multipart message in MIME format.
> --=_alternative 007A6509852577EB_=
> Content-Type: text/plain; charset="US-ASCII"
>
> I want to delete certain rows from table USER_TBL.
> Two tables are involved. USER_TBL and OWNER_TBL.
delete ... using was inv
On 2010-12-03, Shaun McCloud wrote:
> --_000_7742DD496427B743BC8B7BBF6D380BA0A2F114EXCHANGE10geocomm_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
>
> I need to union three PostgreSQL tables and this won't be a problem but the=
> tables a
On 2010-12-06, - wrote:
> --0016364d26cf7fa4970496bf2224
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi everyone,
> I have a question about how best to insert and manipulate the table with
> primary key id for better productivity. I need to insert data into the table
> and get last id.
>
>
On 2010-12-08, Gnanakumar wrote:
> Hi,
>
> We're running PostgreSQL v8.2.3 on RHEL5.
>
> In some places in our application, we use Regular Expression Match Operator
> (~* => Matches regular expression, case insensitive) inside WHERE criteria.
>
> Example:
> SELECT ...
> FROM ...
> WHERE (SKILLS ~
On 2010-12-13, Viktor Bojović wrote:
> --0015175cd20209e2030497532e39
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> Hi
> im trying to create foreign key constraint which checks not only the
> existence of key in foreign table, but it has to check if no
> I need to make update of table1 with data on table2 in the order of id
> of table2
that looks like EAV. is it?
> I=B4m trying to do an update like this:
that's not going to work.
perhaps you can rewrite the from part to only return one row for every
table1_fk, this one row will combine seve
On 2011-01-05, Gary Stainburn wrote:
> On Wednesday 05 January 2011 09:53:43 Gary Stainburn wrote:
>> Now I want to set up a new access level table specific to the itinerary,
>> along the lines of
>>
>> u_id int4 not null references users(u_id)
>> fl_level int4 not null references facility_levels(
On 2011-01-05, Good, Thomas wrote:
> This dubious query worked well previously:
> select * from db_log where log_date LIKE '2011-01-%';
> (currently works on bluehost.com where they run 8.1.22)
>
> Can someone offer a (preferably ANSI compliant) way to do this on 8.4.5?
where date_trunc( log_da
On 2011-01-21, Arindam Hore wrote:
> We are accessing database using ip address.
try adding the IP addresses of some of the clients as seen by the
server to /etc/hosts on the server. see if that helps.
try connecting to the server locally using 'su postgres -c psql'
see if that's slow too.
--
On 2011-01-18, andrew1 wrote:
> hi all,
>
> these return t:
> select 'ab' ~ '[a-z]$'
this matches the b and the end of the string
> select 'ab' ~ '^[a-z]'
this matches the start of the string and the a
> select 'ab' ~ '^[a-z]$' returns f
> Can't I use ^ and $ at the same time to match, in thi
On 2011-01-26, manuel antonio ochoa wrote:
> --0015174be152ceb275049ac2dc95
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
> I have the next :
>
> COUNTONE=`/var/lib/pgsql/bin/./psql -U 'Thor' -d princlocal -p 5432 -h
> 192.170.1.82 -c "select count(*) from monterrey.${NOMBRETB}"`
>
On 2011-01-29, John Fabiani wrote:
> Hi guys,
> I trying to return a 0.00 from a function it there are no records found else
> return the amount.
> select sum(aropen_paid) into _paidamt FROM public.aropen where
> aropen_applyto is not null and (aropen_applyto = $1) ;
>
> IF (FOUND) T
On 2011-02-10, Josh wrote:
> Hi
>
> I'm trying to do a DELETE FROM on my large table (about 800 million
> rows) based on the contents of another, moderately large table (about
> 110 million rows). The command I'm using is:
>
> DELETE FROM records WHERE id NOT IN (SELECT id FROM unique_records);
>
On 2011-02-08, Gavin Beau Baumanis wrote:
> I understand the error message - but what I don't know is what I
> need to set the encoding to - in order to import / use the data.
if you run it through
iconv --from-code=ASCII -to-code=UTF8 -c
it'll strip out all the non-ascii symbols, wi
On 2011-02-15, Tony Capobianco wrote:
> I'm altering datatypes in several tables from numeric to integer. In
> doing so, I get the following error:
>
> dw=# \d uniq_hits
> Table "support.uniq_hits"
>Column | Type | Modifiers
> +-+---
> sourceid | numer
On 2011-03-23, Sree wrote:
> --90e6ba2123fbe15f02049f2ccf73
> Content-Type: text/plain; charset=ISO-8859-1
>
> How can i convert bigint to date format.
>
> bigint=6169625280
that's got the right number of zeros to
be a date expressed as microseconds since epoch
in which case the magic s
On 2011-03-26, Jasen Betts wrote:
> that's got the right number of zeros to
> be a date expressed as microseconds since epoch
except the code which produces a likely data treats it as nanoseconds
--
⚂⚃ 100% natural
--
Sent via pgsql-sql mailing list (pgsql-sql@postgre
On 2011-04-15, LaraK wrote:
> Hello,
>
> I want write a function that converts a timestamp with time zone to the UTC
> zone. But it should all be stored in the winter time.
>
> For example, it must now, in the summer, the German time back by 2 hours and
> in the winter time only 1 hour. But it exp
On 2011-04-14, f vf wrote:
> --000e0cd2bf6a60c30804a0dec84b
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
> i'm using a pl/sql procedure and I prevent inserting duplicate tuples using
> an exception for example:
>
> BEGIN
>INSERT INTO "Triples"(id, subject, predicate, "object
On 2011-04-20, Saulo Venâncio wrote:
> --bcaec52e65e9b2f22304a15f3840
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Hi guys,
> I need your help.
> I have a table called medidas, in this table i have some ocurrences that ha=
> s
> id_medida(primary
On 2011-05-14, Seb wrote:
> Hi,
>
> This probably reflects my confusion with how self joins work.
>
> Suppose we have this table:
> If I want to get a table with records where none of the values in column
> b are found in column a, I thought this should do it:
use the "NOT IN" operator with a su
On 2011-05-16, Steve Crawford wrote:
> On 05/14/2011 07:36 PM, Jasen Betts wrote:
>>
>> use the "NOT IN" operator with a subquery to retch the disallowed
>> values
> Hmmm, "retch" as a synonym for "output"? I've seen more than one cas
On 2011-05-27, Kevin Crain wrote:
> I am trying to create a trigger on updates to a table that is
> partitioned. The child tables are partitioned by month and include
> checks on a timestamp field.
> However when I try to update an existing record with a
> timestamp that would place it in a chi
On 2011-06-03, lists-pg...@useunix.net wrote:
>
> IDTS (HH:MM)
> ---
> 0 20:00
> 0 20:05
> 0 20:10
> 1 20:03
> 1 20:09
>
>
> Does my question make sense?
no, why is (1,20:04) excluded, but (0,20:05) included?
both records are 5 minutes from the newest.
--
On 2011-06-10, Emi Lu wrote:
> Good morning,
>
> String array compare command, I forgot how to do it.
>
> E.g.,
> create table z_drop(id varchar[]);
> insert into z_drop values('{"a1", "a2", "b1", "b2", "b3"}');
>
> I'd like to do:
>
> select * from z_drop where id = any('a1', 'b1');
use the arra
On 2011-06-14, INDER wrote:
> Hello Everyone. I am new to this group and as well as to the Postgres
> also. Can anybody tell me that how to insert hindi text into postgres
> that a user has entered from html input with the use of PHP. Please I
> am waiting for the reply.
add this PHP before any c
On 2011-06-17, hatem gamal elzanaty wrote:
> hi,
> please see this code
>
> select aiah_number.aiah_number_id, aiah_number.aiah_number,
...
> order by rank_value desc limit 1 offset 0;
>
> and this code
>
> select aiah_number.aiah_number_id, aiah_number.aiah_number,
...
> order by rank_value des
On 2011-07-06, Kevin Crain wrote:
> That's why you need to do this inside a function. Basically just make
> an insert function for the table and have it calculate the count and
> do the insert in one transaction.
you will still get duplicates, so include code in the function to
retry if there is
On 2011-07-12, B.Rathmann wrote:
> Hello,
>
> I've been trying to find out how to find out which sql was run to create
> a certain table.
That's like trying to find what change was used to create $1.83
there several possible answers all but one of them wrong, but many of
them may .
> As I nee
On 2011-07-18, Thomas Kellerer wrote:
> Hi,
>
> I just noticed that to_char() will "accept" invalid dates such as 2011-02-31
> and "adjust" them accordingly:
>
> postgres=> select to_date('20110231', 'mmdd');
>
>to_date
>
> 2011-03-03
> (1 row)
>
> is there a way to have to
On 2011-08-03, Raj Mathur (=?utf-8?b?4KSw4KS+4KSc?=
=?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=) wrote:
> Hi,
>
> Can you point me to any pages that explain the difference between using,
> say CHAR(8) vs VARCHAR(8) as the primary key for a table? Is there any
> impact on the database in terms of:
lo
On 2011-08-04, Raj Mathur (=?utf-8?b?4KSw4KS+4KSc?=
=?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=) wrote:
> Thanks, that's useful for benchmarking the various textual data types.
> Anything specific about using CHAR vs VARCHAR for primary keys that are
> going to be referenced from multiple tables tha
On 2011-08-16, adam_pgsql wrote:
>
> Hi,
>
> I have a query hitting a table of 25 million rows. The table has a
>text field ('identifier') which i need to query for matching rows. The
>question is if i have multiple strings to match against this field I
>can use multiple OR sub-statements or multi
On 2011-08-21, Herouth Maoz wrote:
> Hi,
>
> I'm designing a new database. One of the table contains allowed IP ranges for
> a customer (Fields: customer_id, from_ip, to_ip) which is intended to check -
> if an incoming connection's originating IP number falls within the range, it
> is identif
On 2011-08-22, JavaNoobie wrote:
> Hi All,
> I'm trying to write a stored procedure /function to re-order a set of
> calendar months.I have a set of calendar months stored from January to
> December in my tables. And as of now when I do order by on this column ,
> the data is ordered alphabetical
On 2011-08-23, Herouth Maoz wrote:
> EXCLUDE USING GIST ( customer_id WITH =, is_default WITH AND )
> Basically, each customer can have several rows in this table, but only =
> one per customer is allowed to have is_default =3D true. Is this exclude =
> constraint correct?
I don't really
On 2011-08-30, Emi Lu wrote:
> Hi Tom,
>
select * from tablename
where not (col1 ~~* any(array['str1%', 'str2%'... 'strN%']));
>>
>>> If next version could have "not ilike ('', '')" added into window
>>> functions, that's will be great!
>>
>> Why? And what's this got to do with window f
On 2011-09-01, bhavesh1385 wrote:
> Hello All,
>
> I Want some basic compare of data type on PostgreSQL and MySQL.
>
> [1] How to make Primary Key as a Auto Increment...?
you can't, use the pseudo-type serial (or bigserial) instead
which does something similar, but subtly different.
> [2] Suppo
On 2011-09-10, Gabriel Filipiak wrote:
> --bcaec517adbceea3c804ac90a376
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi, this is my first on this list.
>
> I want to know the basics of dynamic sql especially in PostgreSQL. I was
> googling for a while but have no luck for getting a good desc
On 2011-09-29, Péter Szabó wrote:
> users_has_cards.auctions + users_has_cards.decks never can be higher
> then users_has_cards.total. It should be also granted that
> users_has_cards.total - users_has_cards.auctions number of cards from
> a specific type can be in any decks.
>
> The deck assembl
On 2011-11-02, Jan Peters wrote:
> Dear all,
> maybe a stupid question, but: I have a table that is ordered like this:
>
Tables aren't ordered. Sometimes they may seem to be ordered,
but they seldom stay that way for long.
> and I would like to number them according to their timestamps like th
On 2011-11-07, Richard Huxton wrote:
> On 05/11/11 00:12, John Fabiani wrote:
> OK, so it seems psycopg is quoting your strings for you (as you'd
> expect). It's presumably turning your query into:
> ... values (E'123', $$E''$$)
> So - the $$ quoting is unnecessary here - just use the % pla
On 2011-11-08, Sylvain Mougenot wrote:
> --f46d043c7fbad4a6b104b1357041
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
> I'm trying to use table partitionning on a table called JOB.
> Each month a new table is created to contain the rows cre
On 2011-11-08, Russell Keane wrote:
>
> We can extend the table to accept more than 5 characters but the view must =
> return 5 characters.
> If we try to extend the table to accept, say, 10 characters the view will d=
> isplay 10.
> If I also cast the view field to 5 characters then any insert wi
On 2011-11-16, Scott Marlowe wrote:
> You need to wrap a subselect in ():
>
> select setval('foo', (select max(some_id) from some_table));
I prefer to do it in once select like this:
select setval('foo', max(some_id)) from some_table;
--
⚂⚃ 100% natural
--
Sent via pgsql-sql mailing list
On 2011-12-10, Richard Klingler wrote:
> Good day...
>
> I'm trying to build a query for PGSQL 9.1 where a table has two
> references with only one being used depending of the type of entry..
>
> For example, the table has following simplified structure:
>
> portid primary key
>
On 2011-12-08, Andreas wrote:
> Hi,
>
> suppose you need to import a csv with standard ciolums like name,
> adress, phone, ... and some additional text columns that need to be
> split off into referenced tables.
...
> How is the easiest way to to find the customer.id of the new customers
> so I
On 2011-12-08, chester c young wrote:
> have an db with about 15 tables that will handle many companies. no data
> overlap between companies. is it more efficient run-time to use one database
> and index each row by company id, and one database and partition each table
> by company id, or to
On 2011-12-29, Lars Gustafsson wrote:
> Hi,
>
> I am trying to recover a lot of deleted rows from a database ( pg
> 8.2.3 ) , not my database, I promise…..
>> When using the tool pgfsck I get good results, but timestamp is not
>> implemented.
>
> When trying to export as int8 i get fx. 4
On 2011-12-30, Jan Bakuwel wrote:
> This is a cryptographically signed message in MIME format.
>
> What annoys me is that I don't think that a constraint violation made by
> a user should result in an aborted transaction. There is probably a very
> good reason to do that however the logic escapes
On 2012-01-03, Maurício Cruz wrote:
> Hi all,
>
> I'm trying to use lo_import to import a file into my database, if I
> execute from postgres runing in my local machine
> it works perfectly, but if I do it in the postgres runing in the server,
> it says "No such file or directory"
>
> I Guess po
1 - 100 of 160 matches
Mail list logo