Re: [SQL] Tripping over (my own) stupidity - VARCHAR declaration minus specificity
On Fri, Oct 14, 2011 at 1:27 PM, Good, Thomas wrote: > I created a table in a hurry and forgot to specify the max capacity for a > varchar() data type. > Can it be said what the max would be in a case like this (just curious)? > > thanks much > > -- > Thomas A. Good, Senior Database Administrator > Saint Vincent's Hospital Westchester > A Division of Saint Joseph's Medical Center > Residential Services > 1216 Bay Street, Room L-8 > Staten Island, NY 10305 > 718.982.4752 > > "Wir leben, wir sind Glücksmaschinen." - Peter Hein > > This e-mail and any files transmitted with it are confidential and are > intended solely for the use of the individual or entity to who they are > addressed. This communication may contain protected health information > and/or material protected by the attorney-client privilege. If you are not > the intended recipient or the person responsible for delivering the e-mail > to the intended recipient, be advised that you have received this e-mail in > error and that any use, dissemination, forwarding, printing, or copying for > this e-mail is strictly prohibited. if you have received this e-mail in > error, please delete the message and attachments and notify the sender > immediately. > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > According to http://www.postgresql.org/docs/current/static/datatype-character.html, "If character varying is used without length specifier, the type accepts strings of any size. The latter is a PostgreSQL extension." -Adam Cornett
Re: [SQL] Tripping over (my own) stupidity - VARCHAR declaration minus specificity
On Fri, Oct 14, 2011 at 2:09 PM, k...@rice.edu wrote: > On Fri, Oct 14, 2011 at 01:51:04PM -0400, Adam Cornett wrote: > > On Fri, Oct 14, 2011 at 1:27 PM, Good, Thomas wrote: > > > > > I created a table in a hurry and forgot to specify the max capacity for > a > > > varchar() data type. > > > Can it be said what the max would be in a case like this (just > curious)? > > > > > > thanks much > > > > > > > According to > > http://www.postgresql.org/docs/current/static/datatype-character.html, > > "If character varying is used without length specifier, the type accepts > > strings of any size. The latter is a PostgreSQL extension." > > > > -Adam Cornett > > And according to the documentation, the maximum size of a varchar is > 1GB. > > Regards, > Ken > Yes, 1GB is the limit for any column size. From what I can tell a varchar without a size specified acts just like text. -Adam
Re: [SQL] new user on mac
On Tue, Oct 18, 2011 at 5:47 PM, Scott Swank wrote: > I have a postgres 9.1 database up & running, no problem. Purely in > terms of writing sql (ddl, dml & pg/plsql), what tools are > recommended? > > Coming from an Oracle world, I'm thinking of toad, sql developer, etc. > > 1. psql & text editor of choice (if so, which one?) > 2. navicat > 3. textmate with pgedit > 4. eclipse plugin > 5. other? > > Thank you, > Scott > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > psql + editor is the basic tool set, certainly the most flexible. Also be sure to check out pgadmin: http://www.pgadmin.org/download/macosx.php -Adam
[SQL] Re-Sync Stand By Server
I have 2 identical machines, (Ubuntu 10.04 LTS running 9.1.2 from Martin Pitt's PPA) setup with streaming asynchronous replication. Recently I had to take the standby down for some extended maintenance, and when it came back up it was waiting for a WAL segment that had since been removed from the primary. I then shutdown the server, took a new base backup of the primary and copied it over (as per the directions in the streaming wiki) and cleared out the wal segments in the pg_xlog directory of the standby and tried to start it again, but now its not accepting connections and is looking for that wal file in the startup process: postgres 10090 10089 0 12:38 ?00:00:00 postgres: startup process waiting for 0001005200E9 However, segment 5200E9 is no longer on the primary, which is about a week ahead: postgres@pg1:~$ psql -c "SELECT pg_current_xlog_location()" pg_current_xlog_location -- 58/8E1B8D98 So, how do I get the standby to catch up to "catch up" to the primary? -Adam Cornett